Class: ToursController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/tours_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
# File 'app/controllers/tours_controller.rb', line 5

def index
  @tours = Tour.ordained.all
  respond_with @tours
end

#showObject



10
11
12
13
14
15
16
17
# File 'app/controllers/tours_controller.rb', line 10

def show
  @tour = Tour.find(params[:id])
  @tour.visit! :by => request.try(:remote_ip)

  respond_with @tour do |format|
    format.html { render layout: ((request.xhr?) ? false : 'full_screen') }
  end
end