config for mongoid 3
validate encrypted password only if required although the validation itself is not really needed since Validatable takes care of it
popping last element modifies params array therefore super receives empty object, returns nil, and causes tests to fail
Devise's recommended way of adding custom allowed params for sign up
https://github.com/plataformatec/devise/tree/rails4#strong-parameters
Merge pull request #308 from bartoszkopinski/rails4

Rails 4 & mongoid test fixes