I would approach this a little differently. In your cucumber function, I suggest changing the wording to:
When I go to the registration homepage for the event named "2011 CIO IS Chicago"
And in your paths.rb file paths.rb I would handle all events with one regex, for example:
when /the registration homepage for the event named "?(.*)"?/ then event = Event.find_by_name($1) raise "could not find an event with name: #{$1}" if event.blank? event_path(event)
It depends on your Event model, which has a method that can find an event with its name (in this case, I assumed find_by_name ), and a resourceful route is configured for :events .
source share