class CmAdmin::ResourceController
def cm_index(params)
def cm_index(params) @current_action = CmAdmin::Models::Action.find_by(@model, name: 'index') # Based on the params the filter and pagination object to be set @ar_object = filter_by(params, nil, @model.filter_params(params)) # resource_identifier respond_to do |format| if request.xhr? format.html { render partial: '/cm_admin/main/table' } else format.html { render '/cm_admin/main/' + action_name } end end end