Safety and translation of query params in Ruby on Rails

94 views Asked by At

I have a two part question. I'm passing params to links in order to sort and filter in my Ruby on Rails app. Is this type of resulting url safe?

/realestates?column=salesprice&direction=desc

If not, what would be the best way to hide the column name?

The second part of my question is what's the best way to translate these params to different languages. I have i18n set up. This is an example of a link with parameters:

<%= link_to realestates_path(column: :salesprice, direction: 'desc') do %>
 <i class="fa fa-caret-down"></i>Order by price
<% end %>

Thank you!

0

There are 0 answers