Created
August 7, 2012 13:37
-
-
Save ppworks/3285413 to your computer and use it in GitHub Desktop.
routes.rb
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
search_reservation_departure GET /reservation/departure(.:format) departures#search {:destination=>/\w+/} | |
reservation_departure GET /reservation/departure(.:format) departures#show | |
search_reservation_arrival GET /reservation/arrival(.:format) arrivals#search {:source=>/\w+/} | |
reservation_arrival GET /reservation/arrival(.:format) arrivals#show | |
new_reservation GET /reservation/new(.:format) reservations#new |
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
resource :reservation, :only => [:new] do | |
resource :departure, :only => [:show] do # 検索の選択画面はここのshow | |
collection do | |
get :search, :destination => /\w+/, :path => '' # 検索結果はこっち。 | |
end | |
end | |
resource :arrival, :only => [:show] do | |
collection do | |
get :search, :source => /\w+/, :path => '' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment