Displaying 2 results from an estimated 2 matches for "migration_help".
2010 Nov 09
2
Undefined method
I am very new to ROR. (Ruby 1.8.7, rails 2.1.1, rack
0.8.7, mysql 5.1.41)
I has my_app/lib/migration_helpers.rb file:
module MigrationHelpers
def self.foreign_key(from_table, from_column, to_table)
constraint_name = "fk_#{from_table}_#{to_table}"
execute %{alter table #{from_table}
add constraint #{constraint_name}
foreign key (#{from_column})
references...
2008 Jul 04
4
Libs directory
Hello,
I had an application on Rails 1.2 or 1.1 (don''t remember). Now I have
updated it to 2.1.
I had a migrations_helper.rb in the Libs directory which defined
foreign_key and drop_foreign_key methods. But now migrate task doesn''t
find them. Have I to include this directory somewhere with Rails 2.1?
Doesn''t it work as always?
Could I use another thing to declare