Sha256: 84054052a49b2f602a00b5c58769fccb4b3a3071fa8981ba03d1b4dd55c48885

Contents?: true

Size: 404 Bytes

Versions: 10

Compression:

Stored size: 404 Bytes

Contents

require 'active_support/concern'

module Brightcontent
  module BaseControllerExt
    module Filtering
      extend ActiveSupport::Concern

      included do
        helper_method :ransack_search
      end

      def ransack_search
        @_ransack_search ||= base_collection.ransack(params[:q])
      end

      def collection
        @_collection ||= ransack_search.result
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
brightcontent-core-2.6.0 lib/brightcontent/base_controller_ext/filtering.rb
brightcontent-core-2.5.1 lib/brightcontent/base_controller_ext/filtering.rb
brightcontent-core-2.5.0 lib/brightcontent/base_controller_ext/filtering.rb
brightcontent-core-2.4.6 lib/brightcontent/base_controller_ext/filtering.rb
brightcontent-core-2.4.5 lib/brightcontent/base_controller_ext/filtering.rb
brightcontent-core-2.4.4 lib/brightcontent/base_controller_ext/filtering.rb
brightcontent-core-2.4.3 lib/brightcontent/base_controller_ext/filtering.rb
brightcontent-core-2.4.2 lib/brightcontent/base_controller_ext/filtering.rb
brightcontent-core-2.4.1 lib/brightcontent/base_controller_ext/filtering.rb
brightcontent-core-2.4.0 lib/brightcontent/base_controller_ext/filtering.rb