The newest version of Devise doesn\'t have :confirmable enabled by default. I already added the respective columns to the User model but cannot find any code examples of how
This question seems to be odd one ;-) If you written some migration alike:
change_table(:users) do |t|
t.confirmable
end
add_index :users, :confirmation_token, :unique => true
and as you said little change in model (passing additional => :confirmable to devise) like so:
devise :database_authenticatable, :registerable, :confirmable
you can now generate some views (if you didn')
rails generate devise:views
You can go to app/views/devise/confirmations/new.html.erb and check how it looks like or change it. Furthermore you can inspect app/views/devise/confirmations/shared/_links.erb => there is line:
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
This condition checks if confirmable is turned on so... technically if everything went fine it should works OOTB. After creating new account - in log - you should see lines where confirmation mail is sent with appropriate link. It triggers:
Rendered devise/mailer/confirmation_instructions.html.erb
so you have got next place where you can customize it a bit
How to customize confirmation strategy? Please ask exact question what do you want to achieve. You can check devise gem path. In /lib/devise/models/confirmable.rb some comments could be helpful.
regards