diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-11-21 02:20:09 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-22 13:43:12 +0100 |
commit | f821055dc7bead5ab348f63279cd4321d4d9c3c8 (patch) | |
tree | 19061911f358091c8a876c8c001ff8642729058d /railties/lib | |
parent | 799a6fa047aa44ab4813dbf9328941b6d620e9b6 (diff) | |
download | rails-f821055dc7bead5ab348f63279cd4321d4d9c3c8.tar.gz rails-f821055dc7bead5ab348f63279cd4321d4d9c3c8.tar.bz2 rails-f821055dc7bead5ab348f63279cd4321d4d9c3c8.zip |
Do not create table_name_prefix method on isolated module if the method already exists.
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/engine.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 62fb781c19..85fa4424c4 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -363,8 +363,10 @@ module Rails _railtie end - define_method(:table_name_prefix) do - "#{name}_" + unless mod.respond_to?(:table_name_prefix) + define_method(:table_name_prefix) do + "#{name}_" + end end end end |