search for: item_category

Displaying 3 results from an estimated 3 matches for "item_category".

2008 Jul 12
3
calculations on nested resources
Hi, I can''t seem to find a solution to the folowing problem. I have 3 resources that are all bound to eachother like this: class Item < ActiveRecord::Base belongs_to :item_category // has a date and amount attr end class ItemCategory < ActiveRecord::Base has_many :items has_many :item_tops // groups the items in categories end class ItemTop < ActiveRecord::Base belongs_to :item_category // has a start and stop date and an amount attr end The thing I would...
2006 Jul 06
7
form_remote_tag submitting to an rjs file.
I have the following form that I am trying to use, but for some reason, the form gets submitted with out the params values. <%= form_remote_tag(:url => { :action => :add_item_to_order }) %> <tr> <td> <%=collection_select(:order_item , :item_category_id, @item_categories, :id, :name)%> </td> <td> <%= text_field ''order_item'', ''quantity'', :size => "5" %> </td> <%= submit_tag ''Add'' %> This outputs at the server: Processing OrderController#a...
2007 Dec 15
3
List Box Issue - Should be easy, but nor for me!
I have the following snippet in my app: <% @anitem = Item.find(:all, :conditions => "id = " + params[:id]) %> <% form_for :anitem, :url => { :action => :updateitem } do |thisform| -%> ... ... (some code...removed) ... <%= collection_select :thisform, :item_category, ItemCategory.find(:all), :id, :name %><br> <%= collection_select :thisform, :packing_list_type, PackingListType.find(:all), :id, :name %> <%= submit_tag ''Update'' %> <% end %> My issue is that the list box never selects the current value when it pul...