Todd S.
2006-Jul-13 15:12 UTC
[Rails] strange behavior with link_to for "blog" and "gallery"
Okay, what''s so different about the bellow code? When I use the
link_to
function in a partial (three times passing "Stats", "Blog",
and
"Gallery")...
<%= link_to(menuItem.to_s, :controller=>menuItem.to_s.downcase)%>
I get...
<a href="/stats">Stats</a>
<a href="/blog">Blog</a>
<a href="/gallery">Gallery</a>
and in my .css file I have:
a:link {
text-decoration: none;
color: #661;
}
BUT this only works for the "Stats" link. "Blog" and
"Gallery" just
look like the default html link. If I change the link_to line to read:
<%= link_to(menuItem.to_s, :controller=>menuItem.to_s.downcase +
"x")%>
everything looks fine but now I have a link to the wrong controller.
What gives?
--
Posted via http://www.ruby-forum.com/.
Todd S.
2006-Jul-13 15:20 UTC
[Rails] Re: strange behavior with link_to for "blog" and "gallery"
I guess link_to is not the problem because if I just put html code
directly into the layout I still get the problem.
<a href="/stats">Stats</a>
<a href="/blog">Blog</a>
<a href="/gallery">Gallery</a>
this alone produces the error. I''m confused.
--
Posted via http://www.ruby-forum.com/.
Todd S.
2006-Jul-13 15:28 UTC
[Rails] Re: strange behavior with link_to for "blog" and "gallery"
All right. It''s becomming embarrasing but I still don''t know
how to fix
it.
This only happens with links that I have selected at some point. Once I
select "Stats" and then reload the page the same thing happens.
So I guess I need to put into my .css file something like this...
a:visited {
text-decoration: none;
color: #230;
}
--
Posted via http://www.ruby-forum.com/.
Todd S.
2006-Jul-13 15:30 UTC
[Rails] Re: strange behavior with link_to for "blog" and "gallery"
All right. It''s becomming embarrasing.
This only happens with links that I have selected at some point. Once I
select "Stats" and then reload the page the same thing happens.
So I guess I need to put into my .css file something like this...
a:visited {
text-decoration: none;
color: #230;
}
--
Posted via http://www.ruby-forum.com/.