[Solved] How to replace a pattern in a string

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: <%= render … Read more