Skip to content

Instantly share code, notes, and snippets.

@senny
Last active December 10, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save senny/4446037 to your computer and use it in GitHub Desktop.
Save senny/4446037 to your computer and use it in GitHub Desktop.
class Article < ActiveRecord::Base
end
module Posts
end
Posts::Builder # => uninitialized constant Posts::Builder
Article::Builder # => ActiveRecord::Associations::Builder
Post.const_get('Builder') # => ActiveRecord::Associations::Builder
ActiveRecord.const_get('Builder') # => NameError: uninitialized constant ActiveRecord::Builder
Article.ancestors.include?(ActiveRecord::Associations) # => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment