Sha256: 191b5a60a525ae978bc9acbe4b2b3959406c0fe98666ecc8308a1025f6c91918

Contents?: true

Size: 308 Bytes

Versions: 10

Compression:

Stored size: 308 Bytes

Contents

module AdaptiveAlias
  module Hooks
    module SingularAssociation
      def reader(*)
        AdaptiveAlias.rescue_missing_attribute(owner.class){ super }
      end
    end
  end
end

class ActiveRecord::Associations::SingularAssociation
  prepend AdaptiveAlias::Hooks::SingularAssociation
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
adaptive_alias-1.1.2 lib/adaptive_alias/hooks/singular_association.rb
adaptive_alias-1.1.1 lib/adaptive_alias/hooks/singular_association.rb
adaptive_alias-1.1.0 lib/adaptive_alias/hooks/singular_association.rb
adaptive_alias-1.0.0 lib/adaptive_alias/hooks/singular_association.rb
adaptive_alias-0.2.4 lib/adaptive_alias/hooks/singular_association.rb
adaptive_alias-0.2.3 lib/adaptive_alias/hooks/singular_association.rb
adaptive_alias-0.2.2 lib/adaptive_alias/hooks/singular_association.rb
adaptive_alias-0.2.1 lib/adaptive_alias/hooks/singular_association.rb
adaptive_alias-0.2.0 lib/adaptive_alias/hooks/singular_association.rb
adaptive_alias-0.1.0 lib/adaptive_alias/hooks/singular_association.rb