Displaying "Site Title" from MySQL Throughout Entire Site

In your application controller you could do someting like

before_filter :get_site_title

private
def get_site_title

end

Oops, sorry google groups decided to post while I was still writing
(maybe I accidentally hit a key combination to post:(). Anyway...

In your application controller you could do something like

before_filter :get_site_title

private
def get_site_title
  @site_title = Settings.sitetitle
end

and in your layout
<title><%= @site_title %>

This means you are adding an extra db query to every page though.
Since the site title is not going to change do you really need to
store it in the database?

Cheers,

AF

That's not going to work. You need something like:

   @site_title = Settings.find(:first).sitetitle rescue "Default Title"

He might want to just get all the settings:

    @settings = Settings.find(:first) || Settings.new

Then in the view:

   <%= h @settings.sitetitle %>