Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Using Module#prepend on an ActiveRecord::Base class causes callbacks to go missing #10899
Run the following: (you must be using Ruby 2.0 obviously)
require 'active_record' ActiveRecord::Base.establish_connection( :adapter => defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3', :database => ':memory:' ) ActiveRecord::Base.connection.execute('CREATE TABLE users (id INTEGER PRIMARY KEY, email TEXT)') module A; end class User < ActiveRecord::Base prepend A end User.create
The last line will blow up with an error similar to
I tried tracing this one down but