Skip to content

Instantly share code, notes, and snippets.

@cschramm
Last active December 16, 2015 06:59
Show Gist options
  • Select an option

  • Save cschramm/5395729 to your computer and use it in GitHub Desktop.

Select an option

Save cschramm/5395729 to your computer and use it in GitHub Desktop.
Make devise 3 on Rails 4 work with signed_form.
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