Module: ApiResource::Conditions::ClassMethods
- Defined in:
- lib/api_resource/conditions.rb
Instance Method Summary collapse
Instance Method Details
#includes(*args) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/api_resource/conditions.rb', line 17 def includes(*args) self.load_resource_definition # everything in args must be an association args.each do |arg| unless self.association?(arg) raise ArgumentError, "Unknown association #{arg} to eager load" end end # Everything looks good so just create the scope ApiResource::Conditions::IncludeCondition.new(self, args) end |