Method: Arel::Nodes::Case#when
- Defined in:
- activerecord/lib/arel/nodes/case.rb
#when(condition, expression = nil) ⇒ Object
14 15 16 17 |
# File 'activerecord/lib/arel/nodes/case.rb', line 14 def when(condition, expression = nil) @conditions << When.new(Nodes.build_quoted(condition), expression) self end |