Sha256: 74dad82432410c7673d7d137518d17c80b0c5e373b336cf19e0f3d8d837c428b

Contents?: true

Size: 347 Bytes

Versions: 4

Compression:

Stored size: 347 Bytes

Contents

module RailsPerformance
  class QueryBuilder

    def QueryBuilder.compose_from(params)
      result = {}

      result[:controller] = params[:controller_eq]
      result[:action]     = params[:action_eq]
      result[:format]     = params[:format_eq]

      result.delete_if {|k, v| v.nil?}

      { q: result }
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_performance-0.0.1.6 lib/rails_performance/query_builder.rb
rails_performance-0.0.1.5 lib/rails_performance/query_builder.rb
rails_performance-0.0.1.4 lib/rails_performance/query_builder.rb
rails_performance-0.0.1.3 lib/rails_performance/query_builder.rb