Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

stop raising so many exceptions

  • Loading branch information...
commit 8c35f929cf362119ece8bab1afe26a36228fe21d 1 parent 5ff034e
@tenderlove tenderlove authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 activerecord/lib/active_record/migration.rb
View
6 activerecord/lib/active_record/migration.rb
@@ -642,7 +642,11 @@ def last_version
def proper_table_name(name)
# Use the Active Record objects own table_name, or pre/suffix from ActiveRecord::Base if name is a symbol/string
- name.table_name rescue "#{ActiveRecord::Base.table_name_prefix}#{name}#{ActiveRecord::Base.table_name_suffix}"
+ if name.respond_to? :table_name
+ name.table_name
+ else
+ "#{ActiveRecord::Base.table_name_prefix}#{name}#{ActiveRecord::Base.table_name_suffix}"
+ end
end
def migrations_paths
Please sign in to comment.
Something went wrong with that request. Please try again.