Module: Smooth::Queryable::ClassMethods
- Defined in:
- lib/smooth/queryable.rb
Instance Method Summary collapse
- #can_be_queried_by(parameter, *args) ⇒ Object
-
#query(params = {}) ⇒ Object
It is expected that each model class will implement its own query method, which handles all of the various parameters that make sense for that resource.
- #queryable_keys ⇒ Object
Instance Method Details
#can_be_queried_by(parameter, *args) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/smooth/queryable.rb', line 16 def can_be_queried_by parameter, *args = args. settings = self.smooth_queryable_settings ||= Settings.new() settings.(parameter, ) end |
#query(params = {}) ⇒ Object
It is expected that each model class will implement its own query method, which handles all of the various parameters that make sense for that resource
26 27 28 |
# File 'lib/smooth/queryable.rb', line 26 def query(params={}) scoped if respond_to?(:scoped) end |
#queryable_keys ⇒ Object
30 31 32 |
# File 'lib/smooth/queryable.rb', line 30 def queryable_keys smooth_queryable_settings.available_query_parameters end |