Guest User

Untitled

a guest
May 22nd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. ### THE PART I TRY TO UPDATE ####
  2.  
  3. <td>
  4. <ul id="category_listing">
  5. <% @composition.categories.each do |c| %>
  6. <%= render :partial => 'categories', :locals => { :c => c } %>
  7. <% end %>
  8. </ul>
  9. </td>
  10.  
  11. <td>
  12. <% form_remote_tag :url => {:action => 'add_category', :id => @composition.id} do %>
  13. <%= select_tag 'category_id', options_for_select(category_options) -%>
  14. <%= submit_tag 'Add this category'.t %>
  15. <% end %>
  16. </td>
  17.  
  18.  
  19.  
  20. #### CATEGORIES PARTIAL ####
  21. <li id="cat_<%= c.id %>">
  22. <%= c.name %>
  23. <%= link_to_remote 'Remove this',
  24. :url => {
  25. :action => 'remove_category',
  26. :id => c.id,
  27. :composition_id => @composition.id },
  28. :update => 'compositions',
  29. :method => :post %>
  30. </li>
Add Comment
Please, Sign In to add comment