Class: Suspenders::Production::SingleRedirect
- Inherits:
-
Generators::Base
- Object
- Rails::Generators::Base
- Generators::Base
- Suspenders::Production::SingleRedirect
- Defined in:
- lib/suspenders/generators/production/single_redirect.rb
Instance Method Summary collapse
Methods inherited from Generators::Base
default_source_root, inherited
Methods included from ExitOnFailure
Methods included from Actions
#action_mailer_asset_host, #action_mailer_host, #configure_environment, #expand_json, #gem, #replace_in_file
Instance Method Details
#add_rack_canonical_host ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/suspenders/generators/production/single_redirect.rb', line 6 def add_rack_canonical_host inject_into_file( "config/environments/production.rb", %{\n config.middleware.use Rack::CanonicalHost, ENV.fetch("APPLICATION_HOST")}, before: "\nend" ) end |