Displaying 4 results from an estimated 4 matches for "safely_using_models_in_migr".
2006 Jun 10
4
using STI in a migration
I have some classes in my model which use STI and they work as expected
in the console. However, when I try to use them in a migration, I get
"uninitialized constant OfficePhone", for example. Why doesn''t the
migration environment pick up the class defs? OfficePhone is defined in
the model/phone.rb. I put model :phone in the application.rb but my
migration just
2006 Aug 16
2
accessing a model from a migration
Hello again!
ok, i have some initial migration code which sets up my apps schema. i have a
few tables that get initialized with data in this migration where i have the
table data in yaml format in test/fixtures. i use db:fixtures:load
FIXTURES=countries,provstates,employees to initialize these tables..
here''s the wrinkle: employees when it gets loaded should only contain the admin
2006 Feb 24
3
Migrations, data loads and changes to the model
Guys,
I''ve run across an interesting scenario with my migrations, and I hope
you might share some insight.
Let''s say I have 3 migrations and two Models (Person and Car):
001_initial_schema.rb
002_data_load.rb
003_add_car_association.rb
The first creates the initial schema...the second loads default data
using model objects of Person to do so, and the third creates a new
2006 Mar 29
10
newbie question
Hi, I am new to Rails, I followed the cookbook tutorial, it worked fine, but
when I started another tutorial called todo :
when I type : http://127.0.0.1:3000/todo/new
I get this error :
Routing Error
Recognition failed for "/todo/new"
please help me.
--
View this message in context: http://www.nabble.com/newbie-question-t1359958.html#a3643454
Sent from the RubyOnRails Users forum