Sha256: 19b8cdadddc91ed3f4b4b5fff818932724293928724864a223ac3a19a3b3e7b2

Contents?: true

Size: 442 Bytes

Versions: 23

Compression:

Stored size: 442 Bytes

Contents

module RailsPerformance
  module Rails  
    class QueryBuilder

      def QueryBuilder.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

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rails_performance-0.9.9 lib/rails_performance/rails/query_builder.rb
rails_performance-0.9.8 lib/rails_performance/rails/query_builder.rb
rails_performance-0.9.7 lib/rails_performance/rails/query_builder.rb
rails_performance-0.9.6 lib/rails_performance/rails/query_builder.rb
rails_performance-0.9.5 lib/rails_performance/rails/query_builder.rb
rails_performance-0.9.4 lib/rails_performance/rails/query_builder.rb
rails_performance-0.9.3 lib/rails_performance/rails/query_builder.rb
rails_performance-0.9.2 lib/rails_performance/rails/query_builder.rb
rails_performance-0.9.1 lib/rails_performance/rails/query_builder.rb
rails_performance-0.9.0.1 lib/rails_performance/rails/query_builder.rb
rails_performance-0.9.0 lib/rails_performance/rails/query_builder.rb
rails_performance-0.0.1.19 lib/rails_performance/rails/query_builder.rb
rails_performance-0.0.1.18 lib/rails_performance/rails/query_builder.rb
rails_performance-0.0.1.17 lib/rails_performance/rails/query_builder.rb
rails_performance-0.0.1.16 lib/rails_performance/rails/query_builder.rb
rails_performance-0.0.1.15 lib/rails_performance/rails/query_builder.rb
rails_performance-0.0.1.14 lib/rails_performance/rails/query_builder.rb
rails_performance-0.0.1.13 lib/rails_performance/rails/query_builder.rb
rails_performance-0.0.1.12 lib/rails_performance/rails/query_builder.rb
rails_performance-0.0.1.11 lib/rails_performance/rails/query_builder.rb