rails-prelaunch-signup
rails-prelaunch-signup copied to clipboard
Hack to get around Rails 4 and Devise 3.0.0.rc issue
I dont know if you are looking for feedback on Rails 4, but upgrading to Devise 3.0.0.rc breaks the registration process. It has to do with how Devise changed the build_resource method to support strong parameters. This line no longer returns the visitors email address.
https://github.com/RailsApps/rails-prelaunch-signup/blob/master/app/controllers/registrations_controller.rb#L5
The change in Devise here https://github.com/plataformatec/devise/blob/master/app/controllers/devise/registrations_controller.rb#L85 is the culprit.
I made a hack to get around it and it may not be best way to fix it, but I thought I'd share it anyway.
@steveo7 as of devise 3.0.3, it looks like this might be better.
build_resource(sign_up_params)
From here, https://github.com/plataformatec/devise/blob/master/app/controllers/devise/registrations_controller.rb#L13