app/controllers/entities/hotels_controller.rb
# GET /Hotels/redraw                                                  AJAX
#----------------------------------------------------------------------------
GET /Hotels/redraw                                                  AJAX
GET / Hotels / redraw AJAX
def redraw
    current_user.pref[:hotels_per_page] = params[:per_page] if params[:per_page]
    current_user.pref[:hotels_sort_by]  = Conference.sort_by_map[params[:sort_by]] if params[:sort_by]
    @hotels = get_hotels(page: 1, per_page: params[:per_page])
    set_options 
    respond_with(@hotels) do |format|
      format.js { render :index }
    end
  end
def redraw current_user . pref [ :hotels_per_page ] = params [ :per_page ] if params [ :per_page ] current_user . pref [ :hotels_sort_by ] = Conference . sort_by_map [ params [ :sort_by ] ] if params [ :sort_by ] @hotels = get_hotels ( page : 1 , per_page : params [ :per_page ] ) set_options respond_with ( @hotels ) do | format | format . js { render :index } end end
GET /Hotels/redraw                                                  AJAX
GET / Hotels / redraw AJAX
# Refresh options