Ok so i want the title of an event to be in the url like
/events/party-at-mikes
so here is how i am doing it
Event.find_by_title(params[:title])
my link
<%= link_to('<span>EVENTS</span>', course_event_path(obj.golf_course.city.permalink, obj.golf_course.permalink, obj.title), :class => 'right eve_bnt') %>
the obj.title is the event
the problem is that the url looks like this
events/Party at mikes
what do i need to do to make is put the - in space of spaces and on the find capture that