devise

https://github.com/plataformatec/devise

Ruby

Flexible authentication solution for Rails with Warden.

Devise::ParameterSanitizer#sanitize

Sanitize the parameters for a specific +action+.

=== Arguments

* +action+ - A +Symbol+ with the action that the controller is
  performing, like +sign_up+, +sign_in+, etc.

=== Examples

   # Inside the `RegistrationsController#create` action.
   resource = build_resource(devise_parameter_sanitizer.sanitize(:sign_up))
   resource.save

Returns an +ActiveSupport::HashWithIndifferentAccess+ with the permitted
attributes.

Source | Google | Stack overflow

Edit

git clone [email protected]:plataformatec/devise.git

cd devise

open lib/devise/parameter_sanitizer.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Devise--ParameterSanitizer-sanitize-for-pr


# Commit to git

git add lib/devise/parameter_sanitizer.rbgit commit -m "better docs for Devise::ParameterSanitizer#sanitize"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Devise--ParameterSanitizer-sanitize-for-pr

hub pull-request


# Celebrate!