Reputation: 181
I have an action called home
.
I store "home_url"
in the database.
I need to generate the full URL form this string.
For example,
Input: "home_url"
Desired output: "http://myhostname/home/index.html"
Upvotes: 2
Views: 843
Reputation: 83680
Try this
self.send("home_url")
For example
<%= link_to "Home", self.send("home_url") %>
And obviously home_url
should be presented in your routes.rb
file
Upvotes: 5