cirandas.net

ref: master

app/views/shared/_select_subcategories.html.erb


<% if !categories.nil? && !categories.empty? && !@object.nil? %>
  
<% categories.select{|i| @object.accept_category?(i)}.each do |category| %> <%= link_to category.name, { :action => "update_categories", :category_id => category.id, :id => @object, :kind => kind }, { :id => "select-category-#{category.id}-link", :remote => true, :class => "select-subcategory-link", 'data-children' => category.children.map(&:id).to_s } %> <% end %>
<% end %>