module ActiveScaffold::Actions::Search

Public Class Methods

included(base) click to toggle source
# File lib/active_scaffold/actions/search.rb, line 5
def self.included(base)
  base.before_filter :search_authorized_filter, :only => :show_search
  base.before_filter :store_search_params_into_session, :only => [:index]
  base.before_filter :do_search, :only => [:index]
  base.helper_method :search_params
end

Public Instance Methods

Protected Instance Methods

search_respond_to_html() click to toggle source
# File lib/active_scaffold/actions/search.rb, line 18
def search_respond_to_html
  render(:action => "search")
end
search_respond_to_js() click to toggle source
# File lib/active_scaffold/actions/search.rb, line 22
def search_respond_to_js
  render(:partial => "search")
end

Private Instance Methods

search_authorized_filter() click to toggle source
# File lib/active_scaffold/actions/search.rb, line 45
def search_authorized_filter
  link = active_scaffold_config.search.link || active_scaffold_config.search.class.link
  raise ActiveScaffold::ActionNotAllowed unless self.send(link.security_method)
end
search_formats() click to toggle source
# File lib/active_scaffold/actions/search.rb, line 50
def search_formats
  (default_formats + active_scaffold_config.formats + active_scaffold_config.search.formats).uniq
end