Can someone help me in simplifying this line i wrote? other than the ugly syntax, I'm certain there are other methods, other than eval to form a path
return send("link_to", "(#{order_string[:direction]})"
,eval("#{controller}_path(#{query_string})"))
Guranteed that
controller = contacts
query_string = 'status: "ASC"'
order_string[:direction] = "ASC"
The above line should result in (and it does)
link_to "ASC",contacts_path(status: "ASC")