lib/moribus/alias_association.rb
def has_one(name, scope = nil, **options)
        options = scope if scope.is_a?(Hash)

        alias_name = options.delete(:alias)
        reflection = super(name, scope, options)
        alias_association(alias_name, name) if alias_name
        reflection
      end
# Allows :alias option to alias has_one association
Allows :alias option to alias has_one association
Allows : alias option to alias has_one association
def has_one(name, scope = nil, **options)
        options = scope if scope.is_a?(Hash)
        alias_name = options.delete(:alias)
        reflection = super(name, scope, options)
        alias_association(alias_name, name) if alias_name
        reflection
      end
def has_one ( name , scope = nil , ** options ) options = scope if scope . is_a? ( Hash ) alias_name = options . delete ( :alias ) reflection = super ( name , scope , options ) alias_association ( alias_name , name ) if alias_name reflection end
Allows :alias option to alias has_one association
Allows : alias option to alias has_one association
name
scope
options