search for: inventory_item

Displaying 4 results from an estimated 4 matches for "inventory_item".

2006 Aug 15
6
try creating a table for your model
Railers: Greetings from the low end of the learning curve. I have installed all the prerequisites on Win32, including a lite MySQL database with a table in it called Inventory. Then I run this command line... ruby script/generate ajax_scaffold Inventory ...and I get this error message: error Before updating scaffolding from new DB schema, try creating a table for your model
2008 Jul 08
5
map.root doesn't do anything, index.html can't be changed
...1 Server I''ve created several scaffolds that all work, and am trying to set the root page for this app to default to one of the methods. Here''s my routes.rb: ActionController::Routing::Routes.draw do |map| map.resources :physicians map.resources :patients map.resources :inventory_items map.root :controller => ''inventory_items'' map.connect '':controller/:action/:id'' map.connect '':controller/:action/:id.:format'' end when I go to my root URI, I get the same old "Welcome aboard!" page. To make things even m...
2006 Mar 15
1
An Association Problem: AR::Base.find{:include} and n-deep association traversal
...t a simple list of items - each item may have many records in this list. But each invoice_item is only ever associated with ONE Item. Class InventoryItem < ActiveRecord::Base belongs_to :item end and Items gets modified to: Class Item < ActiveRecord::Base belongs_to :brand has_many :inventory_items end This is just fine and dandy, until I come to want to do searching with the AR::Base.find method... and I end up not being able to find based on brand. Obviously the :include => [] element of the options hash won''t work here, as I''ve tried, because it''s only...
2008 Nov 19
2
Where should I put "prerequisite logic"?
...placing most of the logic in the create_item action itself, however this also results in rather ugly code I think (see attached). This also has the drawback that InventoryItem validation errors and "prerequisite errors" are shown in different ways in the views, because they are stored in @inventory_item.errors and flash[:error] respectively. There must be a better way? Where do you guys put logic like this? Any ideas/suggestions are very welcome. Thanks in advance. - Rasmus Attachments: http://www.ruby-forum.com/attachment/2949/test.txt -- Posted via http://www.ruby-forum.com/. --~--~------...