greg.bluvshteyn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Aug-25 16:20 UTC
Re: degrading link_to_remote
Using tabs i had to put in the class name in to link_to_remote BTW. just to understand this definition for link_to_remote name, options = {}, html_options = {} - which means that there are 2 types of options there which to be used like that { :update => "div_name", :url => {...}} and html_options {:class => "class_name",:href => url_for(..)} So thats how I put in my class name <%= link_to_remote "Parent", {:update => "tabs",:url => {:action => "show_parent"}}, {:class => "active"} %> BTW, if you are to disable class parameter you can send in nil ( :class => nil ) Note: Thats was not intended as tutorial - just something for me to remember in the future. Hammed Malik wrote:> Link to remote allows you to add additional html attributes to the tag: > > link_to_remote "Delete this post", :update => "posts", > :url => { :action => "destroy", :id => post.id }, > {:href => url_for(....)} > > Note the href above. > > Hammed > > On 8/21/06, Josh Kieschnick <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > > > i have some items that use the link_to_remote helper and i would like > > them to also link directly to the page that they are calling if > > javascript is not available. i have tried putting the action and id in > > like i would with a regular link_to helper but that didn''t work. > > > > how can i accomplish this? > > > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > > ------=_Part_31315_10890795.1156136894646 > Content-Type: text/html; charset=ISO-8859-1 > X-Google-AttachSize: 1195 > > <div>Link to remote allows you to add additional html attributes to the tag:</div> > <div> </div> > <div>link_to_remote "Delete this post", :update => "posts",<br> :url => { :action => "destroy", :id => <a href="http://post.id">post.id</a> },</div> > <div> {:href => url_for(....)}<br><br>Note the href above.</div> > <div> </div> > <div>Hammed</div> > <div> </div> > <div><span class="gmail_quote">On 8/21/06, <b class="gmail_sendername">Josh Kieschnick</b> <<a href="mailto:rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org">rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org</a>> wrote:</span> > <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>i have some items that use the link_to_remote helper and i would like<br>them to also link directly to the page that they are calling if > <br>javascript is not available. i have tried putting the action and id in<br>like i would with a regular link_to helper but that didn''t work.<br><br>how can i accomplish this?<br><br>--<br>Posted via <a href="http://www.ruby-forum.com/"> > http://www.ruby-forum.com/</a>.<br><br></div><br> > > ------=_Part_31315_10890795.1156136894646----~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---