Created
April 7, 2015 23:00
-
-
Save wethu/52d49d380177720349d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ... | |
| foos = [:bar, :baz] | |
| namespace :foo do | |
| foos.each do |f| | |
| get "#{f.to_str}/new" => 'controller#new', :as => "new_#{f.to_str}" | |
| end | |
| end | |
| # rake routes | |
| # foo_new_bar GET /foo/bar/new(.:format) {:controller=>"foo/controller", :action=>"new"} | |
| # foo_new_baz GET /foo/baz/new(.:format) {:controller=>"foo/controller", :action=>"new"} | |
| # I want: new_foo_bar_path instead of foo_new_bar_path | |
| # ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment