[Solved] How to change the color of link button in .erb template

[ad_1] Use style for inline css <%= link_to ‘Explore’, explore_path, style: “color: red;” %> or use class <%= link_to ‘Explore’, explore_path, class: “link-color” %> and in stylesheet .link-color{ color: “red”; } 2 [ad_2] solved How to change the color of link button in .erb template

[Solved] How to replace a pattern in a string

[ad_1] I would do this for the links <%= ([1,2,3]- [params[:x]]).each do |link_number| %> <%= link_to “Version #{link_number}”, “/page?x=#{link_number}” %> <% end %> This way everytime the page is loaded the link to the other 2 versions will exist. You could handle the partials through the controller (which seems better) or use something like: <%= … Read more