Class: ActiveRecordNestedScope::Builder
- Inherits:
-
Object
- Object
- ActiveRecordNestedScope::Builder
- Defined in:
- lib/activerecord_nested_scope/builder.rb
Instance Method Summary collapse
- #build(node = @node) ⇒ Object
-
#initialize(klass, name, args) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
Instance Method Details
#build(node = @node) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/activerecord_nested_scope/builder.rb', line 11 def build(node = @node) if node.leaf? leaf_relation(node) else build_relation(node) end end |