On Lunes, 30 de enero de 2012 13:45:07 Adam Spiers escribió:
> On Mon, Jan 30, 2012 at 1:06 PM,  <[email protected]> wrote:
> >> P.S. the only reason I need render :super is to invoke my title helper
> >> to set the page title. Is there another way to do that?
> > 
> > You can try with config.label or config.list.label in a before filter,
> > but it could not be enough if you need to set html tags for example.
> 
> Sorry - by page title I meant <title> not the <h2>.  I guess I could
> do that with a before filter, but then it couldn't change per action.

You can change per action with a before_filter, testing action_name and setting 
an instance variable. Also you can use a helper method in your layout to set 
the title. Or override the index action. It's up to you, but there are some 
options. Maybe using a helper method has better performance than overriding 
list view and using render :super.


-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.

Reply via email to