Created
September 30, 2008 14:59
-
-
Save wmoxam/13842 to your computer and use it in GitHub Desktop.
This file contains 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
%w{ asian american european african australian }.each do |p| | |
map.with_options :controller => :people, :people => p do |person| | |
person.send(p.pluralize) p.pluralize, :action => :index, :conditions => {:method => :get} | |
person.send(p) p, :action => :show, :conditions => {:method => :get} | |
... etc | |
end | |
end | |
Gives you: | |
asians_path | |
american_path(@person) | |
etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment