diff --git a/app/controllers/sitemaps_controller.rb b/app/controllers/sitemaps_controller.rb new file mode 100644 index 0000000..3ca02f3 --- /dev/null +++ b/app/controllers/sitemaps_controller.rb @@ -0,0 +1,6 @@ +class SitemapsController < ApplicationController + respond_to :xml + + def index + end +end diff --git a/app/views/sitemaps/index.xml.erb b/app/views/sitemaps/index.xml.erb new file mode 100644 index 0000000..4c63aec --- /dev/null +++ b/app/views/sitemaps/index.xml.erb @@ -0,0 +1,6 @@ + + + + http://<%= request.env["HTTP_HOST"] %>/ + + diff --git a/config/environments/development.rb b/config/environments/development.rb index 597c0c6..87c4120 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -23,6 +23,6 @@ AdoptAHydrant::Application.configure do # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin - config.action_mailer.default_url_options = { :host => 'localhost:3000' } + config.action_mailer.default_url_options = {:host => 'localhost:3000'} end diff --git a/config/environments/production.rb b/config/environments/production.rb index 60be35c..2f8164c 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -47,5 +47,5 @@ AdoptAHydrant::Application.configure do # Send deprecation notices to registered listeners config.active_support.deprecation = :notify - config.action_mailer.default_url_options = { :host => 'localhost:3000' } + config.action_mailer.default_url_options = {:host => 'localhost:3000'} end diff --git a/config/environments/test.rb b/config/environments/test.rb index 88c1d7a..5f8bc00 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -33,5 +33,5 @@ AdoptAHydrant::Application.configure do # Print deprecation notices to the stderr config.active_support.deprecation = :stderr - config.action_mailer.default_url_options = { :host => 'adopt-a-hydrant.heroku.com' } + config.action_mailer.default_url_options = {:host => 'adoptahydrant.com'} end diff --git a/config/routes.rb b/config/routes.rb index 88f151b..36ee755 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,5 +4,6 @@ AdoptAHydrant::Application.routes.draw do :sessions => 'sessions' } resource :user + get 'sitemap(.format)' => 'sitemaps#index', :as => 'sitemap' root :to => 'main#index' end