I have a string that I want to use as part of a variable name. Specifically, in Rails route paths:
<%= foo_path %>
<%= bar_path %>
I want the first part of the route name to be dynamic. So something like
@lol = "foo"
<%= [@lol]_path %> # <-- This would really be the "foo_path" variable
Can Ruby do this?