Open pejrich opened 9 years ago
I have a checkbox that only the creator can edit, but everyone should see as a checkbox
<% escaped_false = raw("<i class='fa fa-square-o'></i>") %> <% escaped_true = raw("<i class='fa fa-check-square-o'></i>") %> <%= best_in_place_if item.creator == current_user, item, :completed, as: :checkbox, collection: {'false' => escaped_false, 'true' => escaped_true}, class: "editable" %>
This shows the checkbox when item.creator == current_user, else is shows just true/false
I have a checkbox that only the creator can edit, but everyone should see as a checkbox
This shows the checkbox when item.creator == current_user, else is shows just true/false