Skip to content

Instantly share code, notes, and snippets.

@ozgun

ozgun/gist:1141681

Created Aug 12, 2011
Embed
What would you like to do?
cucumber - pickle - paths
# eg: I am on the advertisers ad campaign's the ad's edit page
when /^the (.+?) #{capture_model}(?:'s)? #{capture_model}(?:'s)? (.+?) page$/
polymorphic_path [$1.to_sym, model($2), model($3)], :action => $4
# eg: I am on the advertisers the ad campaign's the ad's page
when /^the (.+?) #{capture_model}(?:'s)? #{capture_model}(?:'s)? page$/
polymorphic_path [$1.to_sym, model($2), model($3)]
# eg: I am on the advertisers the ad's edit page
when /^the (.+?) #{capture_model}(?:'s)? (.+?) page$/
polymorphic_path [$1.to_sym, model($2)], :action => $3
# eg: I am on the advertisers the ad's page
when /^the (.+?) #{capture_model}(?:'s)? page$/
polymorphic_path [$1.to_sym, model($2)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment