I want to know that is there any rel attribute in <%= link_to_peramlink %> like tag in html has.
For example:
in html
my link
I have <%= link_to_permalink article,”con”, nil, “my link”, “5m” %> in rails. Is there any rel attribute in that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
link_to_permalinkis not a standard Rails helper. A simple:(you might have to adjust
article.title) will get you a link to the article, assuming something likeresources :articlesis defined inroutes.rb.Setting a
relattribute is trivial:or other attributes:
Finally, I don’t know what your
link_to_permalinkhelper does, but you can useto_paramto make seo-friendly permalinks: see here. (This is the “Rails Way,” if you know what I mean.)