Added initial Mailer configuration and working example as per RailsCasts 206.
testing secret tokens
testing secret tokens
Fixing issues with the config.yml file
Fixing issues with the config.yml file
Fixing issues with the config.yml file
Fixing issues with APP_CONFIG, trying to get a good empty default.
playing with the 'secret_token' and it's secrecy
Added some security by creating a config.yml file with the secrets, instead of passing everything in the repo.
moved URL default_url to environments configuration files.
config.action_mailer.default_url_options is created, doesn't exist in environment configurations.
Create a 'status' based user state-machine for testing and implementation of the signup-confirmation.
It seems that the solution is too complicated for the use case, but it's good learning new stuff. Also, I got it to work regardless of the strict password validation without hacking the validations themselves (at least on the committed code). And the migration is 'change' based and reversible, which is great.
I have the feeling Devise would be taking care of this for me, but that's why this is called learning.
Added some form of verification emails with a verification step page.
No tests are available yet (I know).
Application configuration is private and produced during deploy:setup (for capistrano). This needs to be improved to allow easy Heroku deployments as well.
Sign in is not possible until activation. Users are not shown until active (well, more or less, there are some gaps that need testing and implementation).
Fixed most of the Specs as a hack by validating e-mails and such. Tests should be properly improve to consider the e-mail verification process.
Also, a 'staging' environment configuration has been added to allow for proper e-mails in staging.
Improved 'staging' configuration updating the 'database.yml' template, modifying the log level to be the same as the production default.
Also, fixed the setting of default_url_options as the initializers are run after the environments configuration.
Added whole set of model and mailer Specs.
Added support for mailer tests, based on 'spec/support/mailers.rb' and 'config/environment.rb' to set default_url_options (instead of setup_mail, so that the default URL is used to generate URL routes when needed.
working my way to the proper rspecs for the signup confirmation
Reloading the user after the verification in the helper method.
Moved signup spec to its own RSpec.
Moved email verification from the Users controller to its own EmailVerifications controller.