Class: PagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/pages_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



6
7
8
9
# File 'app/controllers/pages_controller.rb', line 6

def index
  @pages = Page.visible.all
  respond_with @pages
end

#showObject



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

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

  respond_with @page
end