app/controllers/entities/hotels_controller.rb
# POST /Hotels/filter                                                 AJAX
#----------------------------------------------------------------------------
POST /Hotels/filter                                                 AJAX
POST / Hotels / filter AJAX
def filter
    session[:hotels_filter] = params[:status]
    @hotels = get_hotels(page: 1, per_page: params[:per_page])
    respond_with(@hotels) do |format|
      format.js { render :index }
    end
  end
def filter session [ :hotels_filter ] = params [ :status ] @hotels = get_hotels ( page : 1 , per_page : params [ :per_page ] ) respond_with ( @hotels ) do | format | format . js { render :index } end end
POST /Hotels/filter                                                 AJAX
POST / Hotels / filter AJAX