Hi,
Hi,
In my application I’ve set up a custom route that works as long as I
stay within the same model. This makes me think that I must have
something wrong with the route.
map.agent ‘:agent’, :controller => ‘agents’, :action => ‘show’
The resulting url is http://www.domain.com/firstname-lastname
The problem that I have is creating a link_to from a view outside of
agents. I currently have this, but this will
<%= link_to_unless(@property.agent.nil?, “view bio”,
@property.agent.permalink) %> generates this:
Can’t you do this? <%= link_to_unless(@property.agent.nil?, “view bio”, {agent_url, :name => @property.agent}) %> or whatever your name would default to