I'm sure that I'm overlooking something:
Here is how I create the popup:
<%= link_to image_tag("/images/icons/add.png", :alt => "Add")+" Add New
Employer", new_employer_path, :popup => Konfig::POPTIONS2 %>
and in views/employers/on_create.js.rjs I have:
page << 'window.close()'
But nothing happens - I don't even see the rjs file in the log.
/S
Sergio Cambra .:: entreCables S.L. ::. wrote:
On Sábado, 20 de Febrero de 2010 03:21:50 Soren Christensen escribió:
Hi,
Does anybody know if one can redirect to another action after one has
say created a new record ?
You can override action_respond_to_format (for example,
update_respond_to_html). If you want to redirect to edit, use
config.create.edit_after_create = true
One level up. I have a screen where a user can create a new employer.
The create link is build with AS so when clicked the user is taken to an
AS create screen in a new popup.
Now once the create action is completed I would like to just destroy the
window and return to the previous window. Any hints on how to do this ?
You have to override on_create.js.rjs view and add there some javascript code
(page << 'window.close()' should be enough).
--
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.