Hi,
I have the following link_to_remote function
<%=link_to_remote ''up'', :url => {:controller =>
''maintain_votes'',
:action => ''blog_comments_vote'', :id =>
blog_comments_show.id, :vote =>
''true'' }%> |
which generates this code:
<a href="#" onclick="new
Ajax.Request(''/maintain_votes/blog_comments_vote/73?vote=true'',
{asynchronous:true, evalScripts:true}); return false;">up</a>
As href contains # and not the url, this breaks when javascript is not
enabled, does anyone know of a way to fix this when using edge rails?
thanks
--
Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
anyone got any suggestions about this? adam wrote:> Hi, > > I have the following link_to_remote function > > <%=link_to_remote ''up'', :url => {:controller => ''maintain_votes'', > :action => ''blog_comments_vote'', :id => blog_comments_show.id, :vote => > ''true'' }%> | > > which generates this code: > <a href="#" onclick="new > Ajax.Request(''/maintain_votes/blog_comments_vote/73?vote=true'', > {asynchronous:true, evalScripts:true}); return false;">up</a> > > As href contains # and not the url, this breaks when javascript is not > enabled, does anyone know of a way to fix this when using edge rails?-- Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It''s not an Edge Rails issue... it''s just the nature of
link_to_remote. One solution would be to pass the same url options to
the html_options=>{:href=>...}.
On May 7, 7:48 am, adam
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> anyone got any suggestions about this?
>
>
>
> adam wrote:
> > Hi,
>
> > I have the following link_to_remote function
>
> > <%=link_to_remote ''up'', :url => {:controller
=> ''maintain_votes'',
> > :action => ''blog_comments_vote'', :id =>
blog_comments_show.id, :vote =>
> > ''true'' }%> |
>
> > which generates this code:
> > <a href="#" onclick="new
> >
Ajax.Request(''/maintain_votes/blog_comments_vote/73?vote=true'',
> > {asynchronous:true, evalScripts:true}); return
false;">up</a>
>
> > As href contains # and not the url, this breaks when javascript is not
> > enabled, does anyone know of a way to fix this when using edge rails?
>
> --
> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---