Class: Mobility::Backend::Sequel::QueryMethods
- Defined in:
- lib/mobility/backend/sequel/query_methods.rb
Overview
Defines query method overrides to handle translated attributes for Sequel models. For details see backend-specific subclasses.
Direct Known Subclasses
Column::QueryMethods, Hstore::QueryMethods, Jsonb::QueryMethods, KeyValue::QueryMethods, Serialized::QueryMethods, Table::QueryMethods
Instance Method Summary collapse
-
#initialize(attributes, **options) ⇒ QueryMethods
constructor
A new instance of QueryMethods.
Constructor Details
#initialize(attributes, **options) ⇒ QueryMethods
Returns a new instance of QueryMethods.
13 14 15 16 17 18 |
# File 'lib/mobility/backend/sequel/query_methods.rb', line 13 def initialize(attributes, **) @attributes = attributes.map! &:to_sym @attributes_extractor = lambda do |cond| cond.is_a?(Hash) && (cond.keys & attributes).presence end end |