Removing email activation from restful_authentication plugin
I have a Rails app handling authentication with the restful_authentication plugin.
I'm experiencing problems with the email activation f开发者_如何转开发eature and before I deal with that I would like to just allow my users to register without having to go through the email activation process.
How do I disable the email activation feature.
Rails 2.2.3 Restful_authentication
In app/models/user_observer.rb
, I replaced
UserMailer.deliver_signup_notification(user)
with
user.activate!
and it's working for me so far...
The best solution I think is regenerating the authentication:
Save your old code from User and Sessions (from model and controller, if you coded something in that files), destroy the authentication and regenerate it
script/destroy authenticated user sessions
script/generate authenticated user sessions
The destroy script will delete the following files, be sure of backup it if you made any change.
rm db/migrate/20100520071407_create_users.rb
rm app/views/users/_user_bar.html.erb
rm app/views/users/new.html.erb
rm app/views/sessions/new.html.erb
rm app/helpers/users_helper.rb
rm app/helpers/sessions_helper.rb
rm test/fixtures/users.yml
rm test/unit/user_test.rb
rm test/functional/users_controller_test.rb
rm test/functional/sessions_controller_test.rb
rm config/initializers/site_keys.rb
rm lib/authenticated_test_helper.rb
rm lib/authenticated_system.rb
rm app/controllers/users_controller.rb
rm app/controllers/sessions_controller.rb
rm app/models/user.rb
精彩评论