RoR_pal_0001
2008-Mar-24 16:23 UTC
Nesting elements inside a generate <a> tag through link_to
Hi all, I''ve just recently started developing on Rails, just this month. I have a simple question that I can''t find the answer to elsewhere; I''m using the link_to_remote directive which generates an anchor tag. I''d like to have A whole div section nested within the generated anchor tag so that the whole div is clickable rather than just the text in the button. This is how it looks now: <div class="button"> <%= link_to_remote ''Add'', :url => { :action => ''add'', :id => section }, :update => ''section_wrapper''%> </div> I''d like to get a link to the appropriate action nesting <div class="button">Add</div> Any help is appreciated --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Peter
2008-Mar-24 16:36 UTC
Re: Nesting elements inside a generate <a> tag through link_to
i don''t know exactly what you want, but shouldn''t you set the a-tag there to display: block with css? On Mar 24, 5:23 pm, RoR_pal_0001 <cycli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, I''ve just recently started developing on Rails, just this > month. > > I have a simple question that I can''t find the answer to elsewhere; > > I''m using the link_to_remote directive which generates an anchor tag. > I''d like to have A whole div section nested within the generated > anchor tag so that the whole div is clickable rather than just the > text in the button. > > This is how it looks now: > > <div class="button"> > <%= link_to_remote ''Add'', > :url => { :action => ''add'', :id => section }, > :update => ''section_wrapper''%> > </div> > > I''d like to get a link to the appropriate action nesting <div > class="button">Add</div> > > Any help is appreciated--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---