Displaying 2 results from an estimated 2 matches for "itemcategory".
Did you mean:
item_category
2007 Dec 15
3
List Box Issue - Should be easy, but nor for me!
...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
pulls the data fr...
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 like to do now starts from the ItemTop resource. When
I...