16 May 20:32
Re: render partial
From: AndyV <AndyVanasse@...>
Subject: Re: render partial
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-16 18:32:37 GMT
Subject: Re: render partial
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-16 18:32:37 GMT
Yes, Claus, it's fairly easy to do. link_to_remote actually has an
api of:
link_to_remote link_name, options={}, html_options=nil
What you'll need to do is put braces around your existing options (to
designate them as a complete hash) and then you can pass :href as an
html option. Something like this:
link_to_remote 'Claus clause',
{:url=>potentially_dangerous_path, :method=>:get"},
:href=>potentially_dangerous_path
If js id turned off in the browser then the onclick is skipped and it
will react like an ordinary anchor tag.
Good luck!
On May 15, 6:25 pm, Claus Stachl <rails-mailing-l...@...>
wrote:
> hi! man thanx i forgot, damn it, to write in english...
>
> i m with u in thinking its silly not to turn it on... but the site has
> to be really really really user centered
> and there are loads of poeple dont know how to turn it off or on or
> whatever. if its turned off, they arent able to retrieve my content
> cause its fetched with ajax.
>
> so my question was:
>
> is it possible to use a normal link with a render_partial or whatever
> instead of an ajax link_to_remote...
>
> i HAVE to think about a html fallback, but i DONT HAVE that much
> experience in rails ...
>
> however: somebody know any strategy to solve such a problem?
>
> thanx.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
RSS Feed