I am using Rails 2.2.2 and put together a show.html.erb template to
display relevant details of my model (model A). Model A has a one-to-
many relationship to another model model B, and those details are
displayed as individual rows in a table. One of those columns is a
link to another show page on model B''s controller to display model
B''s
details. I use:
<% for b_model in a_model.get_all_b_children %>
to loop through all the children (B''s)
This all works and looks just as I expected, with one exception - the
link displayed in the table shows up as a link, but it is not
clickable - my pointer does not change and if I click it, nothing
happens. It looks like it is nothing more than underlined text.
If I pull the link_to call out of my table (out of the for-loop) and
place it elsewhere on the page, it works perfectly (of course, I need
to manually dig model B out of model A, but I believe that is
immaterial).
Any thoughts as to why link_to does not work from within a table?
Thank you for any help,
Steve
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
On 7 Jan 2009, at 16:10, srj wrote:> > I am using Rails 2.2.2 and put together a show.html.erb template to > display relevant details of my model (model A). Model A has a one-to- > many relationship to another model model B, and those details are > displayed as individual rows in a table. One of those columns is a > link to another show page on model B''s controller to display model B''s > details. I use: > > <% for b_model in a_model.get_all_b_children %> > > to loop through all the children (B''s) > > This all works and looks just as I expected, with one exception - the > link displayed in the table shows up as a link, but it is not > clickable - my pointer does not change and if I click it, nothing > happens. It looks like it is nothing more than underlined text. >I''d guess you''ve generated invalid html. Have your tried pasting the html into the w3c validator ? Fred> If I pull the link_to call out of my table (out of the for-loop) and > place it elsewhere on the page, it works perfectly (of course, I need > to manually dig model B out of model A, but I believe that is > immaterial). > > Any thoughts as to why link_to does not work from within a table? > > Thank you for any help, > > Steve > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Any thoughts as to why link_to does not work from within a table?Have you checked your logs to see if there is any errors being thrown? -- 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 -~----------~----~----~----~------~----~------~--~---