Skip to content

Commit 243b848

Browse files
committed
fix collaboration attribute distribution
1 parent 890335c commit 243b848

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/views/content/_form.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<%= render 'content/form/errors', content: content %>
33

44
<%# Content panels %>
5-
<% content.class.attribute_categories(current_user).each do |category| %>
5+
<% content.class.attribute_categories(@content.persisted? ? @content.user : current_user).each do |category| %>
66
<%= render 'content/form/panel', category: category, f: f, content: content %>
77
<% end %>
88
</div>

app/views/content/form/_panel.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<% if content.respond_to?(field.name.to_sym) %>
7878
<% value = content.send(field.name.to_sym) %>
7979
<% else %>
80-
<% value = Attribute.where(user: current_user, entity: content) %>
80+
<% value = Attribute.where(user: @content.user, entity: content) %>
8181
<% end %>
8282

8383
<% if field.field_type == 'link' %>

app/views/content/form/_text_input.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
if f.object.respond_to?(field.name.to_sym)
77
value = f.object.send(field.name.to_sym)
88
else
9-
value = Attribute.where(user: current_user, attribute_field: field, entity: f.object).first
9+
value = Attribute.where(user: @content.user, attribute_field: field, entity: f.object).first
1010
end
1111
%>
1212

0 commit comments

Comments
 (0)