spree/spree_auth_devise — pull request #138 by westonplatter (2013-10-24 04:08:26+00:00)
Title: enable strong parameter customization

Following the design pattern recently added to spree 2.1.2 within this commit, https://github.com/spree/spree/commit/64ad1d1df46439a8d1603830140d757c9be9f588, this commit abstracts how strong parameters are defined and used in the user_registrations_controller.

The result is that a spree extension can define a custom array of strong parameters used when a SpreeAuthDevise user is created. This could be done in an initializer. A working example of this,

```sh
Spree::Auth::PermittedAttributes.spree_user_attributes
# => [:email, :password, :password_confirmation]

Spree::Auth::PermittedAttributes.spree_user_attributes << :my_custom_attribute

Spree::Auth::PermittedAttributes.spree_user_attributes
# => [:email, :password, :password_confirmation, :my_custom_attribute]
```

All credit goes to jhawthorn, and an inspiring gang of IRC advisors Hates, Radar, huoxito, and jstrong