Hi Paolo!
Thanks very much for your help.
I modified my code so that it runs like this:
add_tab do |t|
t.named 'Addresses'
t.links_to_remote :update => "entity_details_tabnav_content", :url
=> entity_addresses_path(@entity)
end
And this works - the page is correctly rendered within the content
frame of the tabnav! Success!
Now, my last issue here is that when my page is rendered, it comes
along with the application template, when all I really want is the
list. So I have been trying to use a partial to render the content
<div> instead. Something like this:
add_tab do |t|
t.named 'Addresses'
t.links_to_remote :update => "entity_details_tabnav_content",
:url => {'addresses/address', :collection => @entity.addresses}
end
unfortunately I do not get the desired result. Can you suggest
anything?
I have also tried...
add_tab do |t|
t.named 'Addresses'
t.links_to_remote :update => "entity_details_tabnav_content",
:url => 'addresses/address', :collection => @entity.addresses
end
but this gives the error:
ActiveRecord::RecordNotFound in EntitiesController#addresses
Couldn't find Entity with ID=address
am I doing something silly?
On May 15, 5:28 pm, Paolo Donà <
paolo.d...@gmail.com> wrote:
> On Wed, May 13, 2009 at 3:58 PM, Ryan <
ryanharnw...@gmail.com> wrote:
> > When I click any tab on this
> > page, the browser redirects me to the page rather than loading it into
> > the TAB pane. Why does it do that?
>
> That's the intended behavior. If you want to have ajax tabs, you can use
> t.links_to_remote instead of t.links_to or switch to a complete javascript
> solution.
> Paolo
>
> --
> Paolo Dona'
http://paolodona.com
On May 15, 5:28 pm, Paolo Donà <
paolo.d...@gmail.com> wrote: