On 19/10/2010, at 2:26 PM, Julio Cesar Ody wrote:

>> * the page title
> 
> Controller. Use helper methods if there's logic behind determining that.
> 
>> * the <meta> description
> 
> Shouldn't change for each page.
> 
>> * whether it is the currently active tab
> 
> Two options: on the Ruby side, do a check on the current
> controller/action or URL, or in JavaScript, using the same.
> 
>> * the breadcrumbs that lead to the page
> 
> What Ivan said.

IMO views are the right place for this, not the controller. 

I usually start a project with a simple:

- @title = "Some page"

and then when I need to declare some section for the layout to pickup:

- @title, @section = "Some page", :some_section

and eventually some app-specific helper:

- page "Some page", :some_section, :some_sub_section

There's not much point worrying about re-use between projects with this kind of 
view code.

– tim

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to