Hi
I have a controller in which I need to redirect the user to the new
action if there are no elements in the controller. Needless to say
that I use AS for this controller.
I just added an override like this to the index action:
def index
if something?
redirect_to new_xxx_path
else
super
end
end
This happens to work great! Just wondering if this is the right/
recommended way to do this, so I'm not placing a problem for myself in
the future.
Could you even place this at the application_controller level and have
it as a "super action" to catch misguided users that are trying to go
their own ways and do the wrong things ?
/S
--
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.