I am inside a model, and need to create another model, how to I pass
‘this’
as a parameter?
Example:
class User < AR
has_one :company
def create_associations!
@company = Company.build_with_user(this)
end
end
So I’m trying to create the company association using a method from the
Company model, and pass it a User parameter.
How do I pass ‘this’ in ruby?