Created
September 20, 2018 13:17
-
-
Save sihu/9aac0e52f05b8403d264819571394233 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
```` | |
constraints subdomain: 'bauhaus' do | |
[['bodenbelaege', 'agb', :de], ['revetements-de-sol', 'cgv', :fr]].each do |route, terms, locale| | |
get route, to: 'bauhaus_carpets#new', locale: locale | |
get "#{route}/#{terms}", to: 'bauhaus_carpets#terms', locale: locale | |
get "#{route}/:code/edit", to: 'bauhaus_carpets#edit', locale: locale | |
patch "#{route}/:code", to: 'bauhaus_carpets#update', locale: locale | |
post route, to: 'bauhaus_carpets#create', locale: locale | |
get "#{route}/:code", to: 'bauhaus_carpets#show', locale: locale | |
end | |
======= | |
%w[bauhaus hornbach].each do |company| | |
constraints subdomain: company do | |
[['bodenbelaege', :de], ['revetements-de-sol', :fr]].each do |route, locale| | |
get route, to: "#{company}_carpets#new", locale: locale | |
get "#{route}/:code", to: "#{company}_carpets#show", locale: locale | |
get "#{route}/:code/edit", to: "#{company}_carpets#edit", locale: locale | |
patch "#{route}/:code", to: "#{company}_carpets#update", locale: locale | |
post route, to: "#{company}_carpets#create", locale: locale | |
end | |
>>>>>>> testing | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment