Refreshing scaffold via ajax

16 views
Skip to first unread message

dave smylie

unread,
Oct 11, 2011, 4:30:14 PM10/11/11
to actives...@googlegroups.com
I need to update the contents of  scaffold without reloading the entire page.

I can create an action link easily enough to add the action link required:
  
  config.action_links.add('refresh', :label => 'Refresh', :inline => true, :position => false)

But I'm not sure how to re-render the scaffold. 

I believe the partial I need to render is the 'list' partial, but this requires the @page and @records instance variables be populated.
I'm sure how I should be populating these?

Alternatively, is there another, easier way to refresh a scaffold?

Cheers
Dave Smylie

Sergio Cambra .:: entreCables S.L. ::.

unread,
Oct 18, 2011, 3:31:20 AM10/18/11
to actives...@googlegroups.com

Try adding :action => 'index' and it will refresh it

--
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) ser...@entrecables.com

Reply all
Reply to author
Forward
0 new messages