Class: RailsPerformance::Rails::QueryBuilder
- Inherits:
-
Object
- Object
- RailsPerformance::Rails::QueryBuilder
- Defined in:
- lib/rails_performance/rails/query_builder.rb
Class Method Summary collapse
Class Method Details
.compose_from(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/rails_performance/rails/query_builder.rb', line 4 def self.compose_from(params) result = {} result[:controller] = params[:controller_eq] result[:action] = params[:action_eq] result[:format] = params[:format_eq] result[:status] = params[:status_eq] result.delete_if { |k, v| v.nil? } {q: result} end |