Module: ActiveScaffold::Actions::FieldSearch
- Includes:
- Search
- Defined in:
- lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/field_search.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#show_search ⇒ Object
FieldSearch uses params and not @record because search conditions do not always pass the Model’s validations.
Methods included from Search
#reset_search, #reset_search_session_info, #search_session_info, #store_params_into_search_session_info
Class Method Details
.included(base) ⇒ Object
5 6 7 8 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/field_search.rb', line 5 def self.included(base) base.before_filter :search_authorized_filter, :only => :show_search base.before_filter :do_search end |
Instance Method Details
#show_search ⇒ Object
FieldSearch uses params and not @record because search conditions do not always pass the Model’s validations. This facilitates for example, textual searches against associations via .search_sql
12 13 14 15 16 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/field_search.rb', line 12 def show_search params[:search] ||= {} @record = active_scaffold_config.model.new respond_to_action(:field_search) end |