Class: ActiveRecordExtended::QueryMethods::WithCTE::WithChain
- Inherits:
-
Object
- Object
- ActiveRecordExtended::QueryMethods::WithCTE::WithChain
- Defined in:
- lib/active_record_extended/query_methods/with_cte.rb
Instance Method Summary collapse
-
#initialize(scope) ⇒ WithChain
constructor
A new instance of WithChain.
- #recursive(*args) ⇒ Object
Constructor Details
#initialize(scope) ⇒ WithChain
Returns a new instance of WithChain.
17 18 19 |
# File 'lib/active_record_extended/query_methods/with_cte.rb', line 17 def initialize(scope) @scope = scope end |
Instance Method Details
#recursive(*args) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/active_record_extended/query_methods/with_cte.rb', line 21 def recursive(*args) @scope.tap do |scope| scope.with_values += args scope.recursive_value = true end end |