Sha256: 25a6030952481f5aa5acda5f5a3727fe94aeeb9a0434dd2ae793f46a327f5d75

Contents?: true

Size: 361 Bytes

Versions: 4

Compression:

Stored size: 361 Bytes

Contents

module Kashiwamochi
  module ActionController
    extend ActiveSupport::Concern

    def build_search_query!
      q = params.delete(Kashiwamochi.config.search_key) || {}
      instance_variable_set("@#{Kashiwamochi.config.search_key}", Kashiwamochi.build(q))
    end
    alias_method :build_query!, :build_search_query! unless defined?(build_query!)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kashiwamochi-0.4.1 lib/kashiwamochi/action_controller.rb
kashiwamochi-0.4.0 lib/kashiwamochi/action_controller.rb
kashiwamochi-0.3.0 lib/kashiwamochi/action_controller.rb
kashiwamochi-0.2.3 lib/kashiwamochi/action_controller.rb