Skip to content

Instantly share code, notes, and snippets.

@irridescentrambler
Last active September 27, 2019 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irridescentrambler/cfc6be09f87dccaaec5a6a29fa6c9da9 to your computer and use it in GitHub Desktop.
Save irridescentrambler/cfc6be09f87dccaaec5a6a29fa6c9da9 to your computer and use it in GitHub Desktop.
require 'active_record'
ActiveRecord::Base.method(:new).owner
#=> ActiveRecord::Inheritance::ClassMethods
ActiveRecord::Base.method(:create).owner
#=> ActiveRecord::Persistence::ClassMethods
ActiveRecord::Base.method(:update).owner
#=> ActiveRecord::Querying
ActiveRecord::Base.method(:trust).owner
#=> Kernel
class User < ActiveRecord::Base
end
User.method(:where).owner
#=> ActiveRecord::Querying
User.method(:human_attribute_name).owner
#=> ActiveModel::Translation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment