module ActiveScaffold::Actions::CommonSearch

Protected Instance Methods

search_authorized?() click to toggle source

The default security delegates to ModelPermissions. You may override the method to customize.

# File lib/active_scaffold/actions/common_search.rb, line 21
def search_authorized?
  authorized_for?(:crud_type => :read)
end
search_ignore?() click to toggle source
# File lib/active_scaffold/actions/common_search.rb, line 15
def search_ignore?
  active_scaffold_config.list.always_show_search
end
search_params() click to toggle source
# File lib/active_scaffold/actions/common_search.rb, line 11
def search_params
  active_scaffold_session_storage[:search]
end
store_search_params_into_session() click to toggle source
# File lib/active_scaffold/actions/common_search.rb, line 4
def store_search_params_into_session
  if params[:search]
    s = params.delete(:search).strip
    active_scaffold_session_storage[:search] = (s == '' ? nil : s)
  end
end