Sha256: 83ade20efcf2d3170562c3683caf8a94c8ed3013a507d76a62abbac3a23549b1

Contents?: true

Size: 571 Bytes

Versions: 7

Compression:

Stored size: 571 Bytes

Contents

module ActiveScaffold::Actions
  module CommonSearch
    protected
    def store_search_params_into_session
      active_scaffold_session_storage[:search] = params.delete :search if params[:search]
    end

    def search_params
      active_scaffold_session_storage[:search]
    end

    def search_ignore?
      active_scaffold_config.list.always_show_search
    end

    # The default security delegates to ActiveRecordPermissions.
    # You may override the method to customize.
    def search_authorized?
      authorized_for?(:crud_type => :read)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
active_scaffold-3.0.12 lib/active_scaffold/actions/common_search.rb
active_scaffold-3.0.11 lib/active_scaffold/actions/common_search.rb
active_scaffold-3.0.5 lib/active_scaffold/actions/common_search.rb
active_scaffold-3.0.4 lib/active_scaffold/actions/common_search.rb
active_scaffold-3.0.2 lib/active_scaffold/actions/common_search.rb
active_scaffold-3.0.1 lib/active_scaffold/actions/common_search.rb
active_scaffold-3.0.0 lib/active_scaffold/actions/common_search.rb