:remote => true

45 views
Skip to first unread message

alank

unread,
Aug 11, 2011, 11:34:29 PM8/11/11
to simple-navigation
Reviewed the docs and looked all over the web, there doesn't seem to
be a way of setting the link with a :remote => true for ajax request.

I've tried this...

business.item :posts, 'Posts',
business_posts_path(@business), :class => style do |post|
post.item :post, 'Add a Post',
new_business_post_path(@business), :remote => true, :class => style
end

But this ends up adding an attribute of "remote="true" to the <li>
element!

Did I miss a way of passing options to the anchor or is there
currently no means of doing this at the moment?

mjtko

unread,
Aug 14, 2011, 5:31:51 PM8/14/11
to simple-navigation
Hi Andrew,

You can supply a :link options hash as part of the item options, this
should achieve what you're looking for.

eg. post.item :post, 'Add a Post',
new_business_post_path(@business), :link => { :remote =>
true }, :class => style

Let me know how you get on! :-)

Cheers,

Mark.

alank

unread,
Oct 2, 2012, 6:20:23 PM10/2/12
to simple-n...@googlegroups.com
Yes! This works like a charm, thank you for the quick reply. ;)

mjtko

unread,
Oct 2, 2012, 6:50:19 PM10/2/12
to simple-n...@googlegroups.com
Hahaha, no problem!  Thanks for getting back in touch - I hope you figured out the problem in the meantime!

Cheers,

Mark.
Reply all
Reply to author
Forward
0 new messages