Module: Statesman::Adapters::ActiveRecordQueries::ClassMethods
- Defined in:
- lib/statesman/adapters/active_record_queries.rb
Instance Method Summary collapse
Instance Method Details
#in_state(*states) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/statesman/adapters/active_record_queries.rb', line 9 def in_state(*states) states = states.flatten.map(&:to_s) if use_most_recent_column? in_state_with_most_recent(states) else in_state_without_most_recent(states) end end |
#not_in_state(*states) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/statesman/adapters/active_record_queries.rb', line 19 def not_in_state(*states) states = states.flatten.map(&:to_s) if use_most_recent_column? not_in_state_with_most_recent(states) else not_in_state_without_most_recent(states) end end |