Thanks, that seems to be the right idea. Here's what I ultimately settled on...the following results in "Home | Dashboard | PNC" for a request to DashboardController#index.
class ApplicationController < ActionController::Base def self.title item before_filter do |controller| controller.instance_eval do title item end end end title :pnc def initialize @title_parts = [] super end protected def title item @title_parts.insert 0, item end end module ApplicationHelper def title @title_parts.map { |part| t part }.join ' | ' end end class DashboardController < ApplicationController title :dashboard def index title :home end end <title><%= title %></title> Thomas On Apr 21, 3:38 am, Alexandre Friquet <a...@infopiiaf.fr> wrote: > Hi Thomas, > > > How might I clean this up? My ideal would be for each controller to be > > able to call "title" setting its part of the title, and for individual > > actions to manually prepend their title part: > > You may have a look to this screencast from Ryan Bates > :http://railscasts.com/episodes/30-pretty-page-title > > Pretty clean and efficient! > > Hope it helps ;) > > @lex > > smime.p7s > 2KViewDownload -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.