rails-prelaunch-signup icon indicating copy to clipboard operation
rails-prelaunch-signup copied to clipboard

Hack to get around Rails 4 and Devise 3.0.0.rc issue

Open steveo7 opened this issue 11 years ago • 1 comments

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 avatar Jun 28 '13 13:06 steveo7

@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

westonplatter avatar Sep 24 '13 22:09 westonplatter