app/controllers/admin/cms_controller.rb
def index

    # if we’re searching
    if params.key?( :search ) and action_allowed?( :search )

      # we’re searching: attempt to do a custom search
      @content = add_pagination_and_sorting( custom_search )

    else

      # otherwise, grab all the things
      @content = add_pagination_and_sorting( custom_index )

    end

    generate_titles

  end
# Provides an item listing and search functionality. This should not be extended.
#
# === Expected Parameters
#
# [search]  an optional search parameter (ignored if search is disabled on this controller)
# [page]    a pagination parameter
Provides an item listing and search functionality. This should not be extended.
Expected Parameters

[search]  an optional search parameter (ignored if search is disabled on this controller)
[page]    a pagination parameter
Provides an item listing and search functionality . This should not be extended . Expected Parameters [ search ] an optional search parameter ( ignored if search is disabled on this controller ) [ page ] a pagination parameter
def index
    if params.key?( :search ) and action_allowed?( :search )
      @content = add_pagination_and_sorting( custom_search )
    else
      @content = add_pagination_and_sorting( custom_index )
    end
    generate_titles
  end
def index if params . key? ( :search ) and action_allowed? ( :search ) @content = add_pagination_and_sorting ( custom_search ) else @content = add_pagination_and_sorting ( custom_index ) end generate_titles end
Provides an item listing and search functionality.
Provides an item listing and search functionality .
# if we’re searching # we’re searching: attempt to do a custom search # otherwise, grab all the things