Methods
Class Public methods
new(klass, association)
📝 Source code
# File activerecord/lib/active_record/association_relation.rb, line 5
def initialize(klass, association)
super(klass)
@association = association
end
🔎 See on GitHub
Instance Public methods
==(other)
📝 Source code
# File activerecord/lib/active_record/association_relation.rb, line 14
def ==(other)
other == records
end
🔎 See on GitHub
build(*args, &block)
Also aliased as: new
📝 Source code
# File activerecord/lib/active_record/association_relation.rb, line 18
def build(*args, &block)
scoping { @association.build(*args, &block) }
end
🔎 See on GitHub
create(*args, &block)
📝 Source code
# File activerecord/lib/active_record/association_relation.rb, line 23
def create(*args, &block)
scoping { @association.create(*args, &block) }
end
🔎 See on GitHub
create!(*args, &block)
📝 Source code
# File activerecord/lib/active_record/association_relation.rb, line 27
def create!(*args, &block)
scoping { @association.create!(*args, &block) }
end
🔎 See on GitHub
proxy_association()
📝 Source code
# File activerecord/lib/active_record/association_relation.rb, line 10
def proxy_association
@association
end
🔎 See on GitHub