Last active
December 20, 2015 08:49
-
-
Save poc7667/6103308 to your computer and use it in GitHub Desktop.
Setting ActionMailer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.action_mailer.default_url_options = { :host => '172.16.77.88:3000' } | |
#remmembe to set in production.rb ,also |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.mailer_sender = "[email protected]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rails g migration add_confirmable_to_devise | |
class AddConfirmableToDevise < ActiveRecord::Migration | |
def self.up | |
add_column :users, :confirmation_token, :string | |
add_column :users, :confirmed_at, :datetime | |
add_column :users, :confirmation_sent_at , :datetime | |
add_column :users, :unconfirmed_email, :string | |
add_index :users, :confirmation_token, :unique => true | |
end | |
def self.down | |
remove_index :users, :confirmation_token | |
remove_column :users, :unconfirmed_email | |
remove_column :users, :confirmation_sent_at | |
remove_column :users, :confirmed_at | |
remove_column :users, :confirmation_token | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def confirm(email) | |
@greeting = "Hi" | |
@message = "Thank you for confirmation!" | |
mail to: email | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment