Forum: Ruby on Rails AJAX previous/next links to update entry

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
ganon (Guest)
on 2007-01-09 15:59
(Received via mailing list)
i have single <div id="featured"> that loads a single entry...im trying
to refresh that <div> via "Previous" and "Next" links with a AJAX
calls...i am using link_to_remote as seen here...:

<%= link_to_remote "previous", :update => 'featured',
  :url => { :page => @entry_pages.current.next } if
@entry_pages.current.next %>

my controller has...:

def list
  @entry_pages, @entries = paginate :entries, :per_page => 1
end

am i on the right track?..this seems to be working, although the <div>
updates with the whole new page layout, not just the snippet of the
entry code...i suspect this has to do with "render(:layout => false)",
but i dont know where/how to add this in my controller...how can this
be done, am i going about this in the right way?..any help is
appreciated....!
This topic is locked and can not be replied to.