We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66f4665 commit 86b81aaCopy full SHA for 86b81aa
config/routes.rb
@@ -1,9 +1,11 @@
1
Rails.application.routes.draw do
2
- #TODO: works for development
3
- if Rails.env.development?
4
- Rails.application.routes.default_url_options[:host] = "localhost:3000"
5
- else
6
- Rails.application.routes.default_url_options[:host] = 'www.snippetsafe.com'
+
+ Rails.application.routes.default_url_options[:host] = if Rails.env.development?
+ "localhost:3000"
+ elsif Rails.env.staging?
+ 'www.snippet-safe-staging.herokuapp.com'
7
+ elsif Rails.env.production?
8
+ 'www.snippetsafe.com'
9
end
10
11
devise_for :users, controllers: {
0 commit comments