app/controllers/entities/itineraries_controller.rb
# POST /itineraries/filter                                                  AJAX
#----------------------------------------------------------------------------
POST /itineraries/filter                                                  AJAX
POST / itineraries / filter AJAX
def filter
    session[:itineraries_filter] = params[:category]
    @itineraries = get_itineraries(page: 1, per_page: params[:per_page])
    respond_with(@itineraries) do |format|
      format.js { render :index }
    end
  end
def filter session [ :itineraries_filter ] = params [ :category ] @itineraries = get_itineraries ( page : 1 , per_page : params [ :per_page ] ) respond_with ( @itineraries ) do | format | format . js { render :index } end end
POST /itineraries/filter                                                  AJAX
POST / itineraries / filter AJAX