Last active
December 16, 2015 06:59
-
-
Save cschramm/5395729 to your computer and use it in GitHub Desktop.
Make devise 3 on Rails 4 work with signed_form.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ParameterSanitizer < Devise::ParameterSanitizer | |
| def for(kind) | |
| @params.fetch @resource_name, {} | |
| end | |
| end | |
| class ApplicationController < ActionController::Base | |
| include SignedForm::ActionController::PermitSignedParams | |
| protected | |
| def devise_parameter_sanitizer | |
| ParameterSanitizer.new resource_name, params | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment