Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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

wants to merge 1 commit into from

Conversation

steveo7
Copy link

@steveo7 steveo7 commented Jun 28, 2013

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.

This is probably circumventing security, but I thought I'd share it  in case it would help.
@westonplatter
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants