El Saturday 25 April 2009 23:27:49 Soren escribió:
> I have a page upon which I have to embedded scaffolds.
>
> At some point the user might have created data with those scaffolds
> such that additional options to the page should be enabled.
>
> Any suggestions to cause the page to get reloaded after an CRUD action
> on one of the scaffold (simplest solution) or how to cause an AJAX
> action to trigger that would update the page with the new options.
>
> Is the before_create_save action in AS a path anyone has successfully
> used for this ?
>
> /S


You should add some javascript to the views to reload the scaffold, or add a 
new link with javascript after a create for example. Try to create a 
on_create.js.rjs view (in rails 2.3, on_create.rjs in previous versions) in 
your controller's views, call render :super to include the default response 
and add your javascript code.

For example:
page << render(:super)
page.insert_html :top, active_scaffold_tbody_id, 'html code'
page.insert_html :top, active_scaffold_tbody_id, :partial => 'partial_name'
page << 'custom JS code'



-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

--~--~---------~--~----~------------~-------~--~----~
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