I've following link_to on show article view page,
<%= link_to "Add Pictures",
new_picture_path(article_id: @article.id),
class: "btn btn-small btn-success" %>
This works perfectly by displaying 'link' as a button with the help of "btn" class. Only problem with this is that the text on the button changes to gray after a click (as in visited link visited). How do I keep it as original text color (white in this case)? Or what kinds of css magic do I need to keep the original text color.
Or simply I can fix it by changing it to button_to as follows,
<%= button_to "Add Pictures",
new_picture_path(article_id: @article.id),
method: :get, class: "btn btn-small btn-success" %>
But the problem with this is that, my article_id is get sets to nil, which fails the validation error that article_id is not set.
What do I do? Fix the link_to with css (how?) or fix the button_to issue (how?). Any help is appreciated.