Sha256: c7f4d33ce06dd4b952991449cca538e5d27fb74cbebbcf8d575a4ef8414653e6
Contents?: true
Size: 515 Bytes
Versions: 30
Compression:
Stored size: 515 Bytes
Contents
class PingsController < ApplicationController 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 end
Version data entries
30 entries across 30 versions & 1 rubygems