Method: Devise::Models::Authenticatable#serializable_hash
- Defined in:
- lib/devise/models/authenticatable.rb
#serializable_hash(options = nil) ⇒ Object
Redefine serializable_hash in models for more secure defaults. By default, it removes from the serializable model all attributes that are not accessible. You can remove this default by using :force_except and passing a new list of attributes you want to exempt. All attributes given to :except will simply add names to exempt to Devise internal list.
104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/devise/models/authenticatable.rb', line 104 def serializable_hash( = nil) ||= {} [:except] = Array([:except]) if [:force_except] [:except].concat Array([:force_except]) else [:except].concat BLACKLIST_FOR_SERIALIZATION end super() end |