module ApplicationHelper def render_sidebar(partial_name, collection) render(:partial => "sidebars/#{partial_name}") unless collection.nil? end ## # Show an HTML list of links to available mp3, and mp4 content # for this episode. # def media_links(episode) links = [] %w(mp3 mp4).each do |media_type| if episode.send("has_#{media_type}") # Add a link to the item, plus the size. # # MP3 18.3 MB links << "#{link_to(media_type.upcase, episode.send("#{media_type}_url"))} #{human_size(episode.send("#{media_type}_length"))}" end end %(
instead of
r.to_html
end
def page_title
@episode.nil? ? "Ruby on Rails Podcast" : "#{@episode.title} | the Ruby on Rails Podcast"
end
end