Changeset 1210

Show
Ignore:
Timestamp:
07/19/08 11:43:02 (6 months ago)
Author:
alban
Message:

Mise en place du podcast pour chaque Show (via /feed). Refs #2

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/public_controller.rb

    r1203 r1210  
    1717    @episode = find_episode 
    1818    render :layout => "public_render" 
     19  end 
     20 
     21  def feed 
     22    @show = find_show 
     23    render :content_type => "application/rss+xml", :layout => false 
    1924  end 
    2025 
  • trunk/app/models/show.rb

    r1194 r1210  
    2929  end 
    3030 
     31  def last_update_at 
     32    (self.episodes + [ self ]).collect(&:updated_at).max 
     33  end 
     34 
    3135end 
  • trunk/config/environments/development.rb

    r1193 r1210  
    1717# Don't care if the mailer can't send 
    1818config.action_mailer.raise_delivery_errors = false 
     19 
     20ActionController::Base.asset_host = "localhost:3000" 
  • trunk/config/environments/production.rb

    r1193 r1210  
    1717# Disable delivery errors, bad email addresses will be ignored 
    1818# config.action_mailer.raise_delivery_errors = false 
     19 
     20ActionController::Base.asset_host = "www.bonnes-ondes.fr" 
  • trunk/config/routes.rb

    r1193 r1210  
    1313  map.connect '/emission/:show_slug/episode/:episode_slug/ecoute/:content_slug', :controller => 'public', :action => 'content' 
    1414  map.connect '/emission/:show_slug/episode/:episode_slug/ecouter/:content_slug', :controller => 'public', :action => 'playlist' 
     15  map.connect '/emission/:show_slug/feed', :controller => 'public', :action => 'feed' 
    1516 
    1617  # You can have the root of your site routed by hooking up ''