Skip to content

Instantly share code, notes, and snippets.

View nazar's full-sized avatar

Nazar Aziz nazar

  • Clevertech
  • Newlyn, Cornwall, United Kingdom
View GitHub Profile

Keybase proof

I hereby claim:

  • I am nazar on github.
  • I am mcnazar (https://keybase.io/mcnazar) on keybase.
  • I have a public key ASCm3tSfzO3S-GluI4kq-kxZlQFlOgr9a94QrOXig1f0AQo

To claim this, I am signing this object:

module ActiveRecord
class Reflection::AssociationReflection
# Return a named scope instead of the bare ActiveRecord::Base subclass.
def klass_with_scope
k = klass_without_scope
options[:scope].nil? ? k : k.send(options[:scope])
end
alias_method_chain :klass, :scope
end