Module: BabySqueel::Nodes
- Defined in:
- lib/baby_squeel/nodes.rb
Defined Under Namespace
Classes: Attribute, Generic, Proxy
Class Method Summary collapse
-
.unwrap(node) ⇒ Object
Unwraps a BabySqueel::Proxy before being passed to ActiveRecord.
-
.wrap(arel) ⇒ Object
Wraps an Arel node in a Proxy so that it can be extended.
Class Method Details
.unwrap(node) ⇒ Object
Unwraps a BabySqueel::Proxy before being passed to ActiveRecord.
18 19 20 21 22 23 24 25 26 |
# File 'lib/baby_squeel/nodes.rb', line 18 def unwrap(node) if node.respond_to? :_arel node._arel elsif node.is_a? Array node.map { |n| unwrap(n) } else node end end |