On Domingo, 20 de Diciembre de 2009 00:10:43 rvhi escribió:
> Hi,
>
> A table shows dynamic data. After each insert or destroy, we need to
> refresh the whole table. I looked into on_create.js.rjs. I want to
> replace

If you want to reload after insert I wouldn't show create form with AJAX, I 
would use config.create.link.page = true

To reload table after destroy you can change destroy_respond_to_js to use a 
javascript redirect:
render :update do |page|
  page.redirect_to main_path_to_return
end

>
>   page.insert_html :top, active_scaffold_tbody_id, :partial =>
> 'list_record', :locals => {:record => @record}
>
> to something like,
>     options = { :sorting => active_scaffold_config.list.user.sorting,
>
>               :per_page => active_scaffold_config.list.user.per_page,
>               :page => active_scaffold_config.list.user.page }
>
>     @page = find_page(options)
>     @records = @page.items
>     page.replace_html active_scaffold_content_id, :partial => 'list'
>
> But AS can't find method 'find_page', anyway to resolve this?
>
> Thanks,
>
>
> --
>
> 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.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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