app/controllers/events_controller.rb
# Render +events+ for a particular format.
Render +events+ for a particular format.
Render + events + for a particular format .
def render_events(events)
    respond_to do |format|
      format.html 
      format.kml  
      format.ics  { ical_export(yield_events(events)) }
      format.atom { render :template => 'events/index' }
      format.xml  { render :xml  => yield_events(events).to_xml(:include => :venue) }
      format.json { render :json => yield_events(events).to_json(:include => :venue), :callback => params[:callback] }
    end
  end
def render_events ( events ) respond_to do | format | format . html format . kml format . ics { ical_export ( yield_events ( events ) ) } format . atom { render :template => 'events/index' } format . xml { render :xml => yield_events ( events ) . to_xml ( :include => :venue ) } format . json { render :json => yield_events ( events ) . to_json ( :include => :venue ) , :callback => params [ :callback ] } end end
Render +events+ for a particular format.
Render + events + for a particular format .
# *.html.erb # *.kml.erb
events