Class: PingsController

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

Instance Method Summary collapse

Methods included from Zena::App

included

Instance Method Details

#showObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/pings_controller.rb', line 2

def show
  whoami = {
    'visitor' =>  "#{visitor.first_name} #{visitor.name}",
    'site' => current_site.name,
    'format' => request.format.to_s
    }
  whoami_xml = Builder::XmlMarkup.new.ping do |p|
    p.visitor(whoami['visitor'])
    p.site(whoami['site'])
    p.format(whoami['format'])
  end
  respond_to do |wants|
    wants.html { render :text => whoami.inspect  }
    wants.xml { render :xml => whoami_xml }
  end
end