diff options
author | Jakub Kuźma <qoobaa@gmail.com> | 2011-11-26 17:11:17 +0100 |
---|---|---|
committer | Jakub Kuźma <qoobaa@gmail.com> | 2011-11-26 17:11:17 +0100 |
commit | 89d6db05d74ba8cb1d99aaa2166f02dd67a34a36 (patch) | |
tree | 1a81ca72c010df68a6fa6ca1ac86fd91320b2869 /railties/lib | |
parent | f7545216750693b90d59d7c39ea5789835dae9d2 (diff) | |
download | rails-89d6db05d74ba8cb1d99aaa2166f02dd67a34a36.tar.gz rails-89d6db05d74ba8cb1d99aaa2166f02dd67a34a36.tar.bz2 rails-89d6db05d74ba8cb1d99aaa2166f02dd67a34a36.zip |
allow using orm_instance without invoking orm_class first in generators
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/resource_helpers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb index b34bc4a524..f2195cb81a 100644 --- a/railties/lib/rails/generators/resource_helpers.rb +++ b/railties/lib/rails/generators/resource_helpers.rb @@ -73,7 +73,7 @@ module Rails # Initialize ORM::Generators::ActiveModel to access instance methods. def orm_instance(name=singular_table_name) - @orm_instance ||= @orm_class.new(name) + @orm_instance ||= orm_class.new(name) end end end |