app/controllers/entities/parks_controller.rb
def filter
    session[:parks_filter] = params[:status]
    @parks = get_parks(page: 1, per_page: params[:per_page])

    respond_with(@parks) do |format|
      format.js { render :index }
    end
  end
# POST /Parks/filter                                                 AJAX
#----------------------------------------------------------------------------
POST /Parks/filter                                                 AJAX
POST / Parks / filter AJAX
def filter
    session[:parks_filter] = params[:status]
    @parks = get_parks(page: 1, per_page: params[:per_page])
    respond_with(@parks) do |format|
      format.js { render :index }
    end
  end
def filter session [ :parks_filter ] = params [ :status ] @parks = get_parks ( page : 1 , per_page : params [ :per_page ] ) respond_with ( @parks ) do | format | format . js { render :index } end end
POST /Parks/filter                                                 AJAX
POST / Parks / filter AJAX