<%= form_for @item, url: user_item_url do |form| %>

Edit Item

<%= select "category", "item_category_id", ItemCategory.order("name ASC").all.collect {|p| [ p.name, p.id ] }, { :selected => @item.item_category.id } %> <%= form.text_field :name %> <%= form.text_area :desc, class: "description", :rows => 5 %> <%= form.text_field :link, class: "link" %> <%= form.select :permission, options_for_select(['commons', 'public', 'private'], @item.permission) %> <%= form.submit "Update", class: "update" %> <% end %>