Skip to content

Instantly share code, notes, and snippets.

@colormeruby
colormeruby / gist:4119342
Created November 20, 2012 17:15
Rails: Mailer Settings
# /config/environments/development.rb
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
# /config/environments/production.rb
config.action_mailer.default_url_options = {:host => 'yourdomain.com'}
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "127.0.0.1",
@colormeruby
colormeruby / gist:4110834
Created November 19, 2012 14:08
Devise: Routes Information
# Devise Configuration
devise_for :users
devise_scope :user do
get "/login", :to => "devise/sessions#new" # Add a custom sign in route for user sign in
get "/logout", :to => "devise/sessions#destroy" # Add a custom sing out route for user sign out
get "/register", :to => "devise/registrations#new" # Add a Custom Route for Registrations
end
@colormeruby
colormeruby / gist:4105357
Created November 18, 2012 13:47
Database: Convert SQLite to PostgreSQL
sqlite3 development.db .dump | psql dbname username
@colormeruby
colormeruby / gist:4093186
Created November 17, 2012 04:00
HTML: colormeruby credit
<!-- _ _
| | | |
___ ___ | | ___ _ __ _ __ ___ ___ _ __ _ _| |__ _ _
/ __/ _ \| |/ _ \| '__| '_ ` _ \ / _ \ '__| | | | '_ \| | | |
| (_| (_) | | (_) | | | | | | | | __/ | | |_| | |_) | |_| |
\___\___/|_|\___/|_| |_| |_| |_|\___|_| \__,_|_.__/ \__, |
__/ |
|___/
A one man web studio dedicated to ruby development