Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ coverage
# Other
.rbenv-version
.env
.rspec
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--drb
--color
--format Fuubar
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ You can now run `heroku open` to visit [rails-base-app.herokuapp.com](http://rai
* In a second terminal window, `rspec` will now run RSpec instantly without waiting for app initialization
* You can still run `bundle exec rspec` without Spork for one-off tests

## Feature Examples
See the wiki for instructions for the following:
* [How to send email](/wiki/How to send email)


## rails_base_app TODO
* Create script to rename app with single command
* Put JS OO architecture example in place
* Make favicon.ico use asset pipeline
* Dynamic 500 page
1 change: 1 addition & 0 deletions app/views/pages/not_found.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
%h1.text-center This page could not be found
4 changes: 4 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false

# Mail: use mailcatcher in development to send/catch SMTP messages on :1025
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }

# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log

Expand Down
15 changes: 15 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false

config.action_mailer.default_url_options = { :host => ENV["EMAIL_HOST"] || "example.com" }

if ENV['SENDGRID_USERNAME'].present?
ActionMailer::Base.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => '587',
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com'
}

ActionMailer::Base.delivery_method = :smtp
end

# Enable threaded mode
# config.threadsafe!

Expand Down
3 changes: 3 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@

get "grid" => 'pages#grid'

# catch rest of paths with 404 page
match '*path', to: 'pages#not_found', via: [:get, :post]

end