Skip to content

Commit

Permalink
Avoid getting redefined method warning
Browse files Browse the repository at this point in the history
Warning:

  ~/projects/rails/activerecord/lib/active_record/railtie.rb:140: warning: method redefined; discarding old extend_message
  ~/projects/rails/activerecord/lib/active_record/errors.rb:104: warning: previous definition of extend_message was here
  • Loading branch information
lukaszx0 committed Dec 25, 2013
1 parent 278bbfd commit 7a9d292
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions activerecord/lib/active_record/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class Railtie < Rails::Railtie # :nodoc:
ActiveSupport.on_load(:active_record) do

class ActiveRecord::NoDatabaseError
remove_possible_method :extend_message
def extend_message(message)
message << "Run `$ bin/rake db:create db:migrate` to create your database"
message
Expand Down

0 comments on commit 7a9d292

Please sign in to comment.