Skip to content

Commit

Permalink
fix collaboration attribute distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
drusepth committed Sep 9, 2018
1 parent 890335c commit 243b848
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/content/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%= render 'content/form/errors', content: content %>

<%# Content panels %>
<% content.class.attribute_categories(current_user).each do |category| %>
<% content.class.attribute_categories(@content.persisted? ? @content.user : current_user).each do |category| %>
<%= render 'content/form/panel', category: category, f: f, content: content %>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content/form/_panel.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<% if content.respond_to?(field.name.to_sym) %>
<% value = content.send(field.name.to_sym) %>
<% else %>
<% value = Attribute.where(user: current_user, entity: content) %>
<% value = Attribute.where(user: @content.user, entity: content) %>
<% end %>

<% if field.field_type == 'link' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content/form/_text_input.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if f.object.respond_to?(field.name.to_sym)
value = f.object.send(field.name.to_sym)
else
value = Attribute.where(user: current_user, attribute_field: field, entity: f.object).first
value = Attribute.where(user: @content.user, attribute_field: field, entity: f.object).first
end
%>

Expand Down

0 comments on commit 243b848

Please sign in to comment.