Forum: Ruby on Rails Per page meta data for better SEO

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
059ed46172a087063ce26250e44c8627?d=identicon&s=25 Fernando Perez (fernando)
on 2008-11-10 17:38
Hi,

How do you handle the generation of your specific <title> and <meta
name="description" content="..."/> tags on each of your pages?

I want them to be specific to each page, but I can't think of a nice and
clean way to do that. Currently in each action I set 2 variables @title
and @description, and in my view I simply call   <title><%= @title
%></title>

But this code shouldn't be cluttering my controllers, and is hard to
maintain.
This topic is locked and can not be replied to.