Module: Brightcontent::BaseControllerExt::Filtering

Extended by:
ActiveSupport::Concern
Included in:
Brightcontent::BaseController
Defined in:
lib/brightcontent/base_controller_ext/filtering.rb

Instance Method Summary collapse

Instance Method Details

#collectionObject



16
17
18
# File 'lib/brightcontent/base_controller_ext/filtering.rb', line 16

def collection
  @_collection ||= ransack_search.result
end

#ransack_searchObject



12
13
14
# File 'lib/brightcontent/base_controller_ext/filtering.rb', line 12

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