module Devise::Models::Serializable::ClassMethods

def blacklist_keys

Returns keys that should be removed when serializing the record.
def blacklist_keys
  @blacklist_keys ||= to_adapter.column_names.map(&:to_s) - accessible_attributes.to_a.map(&:to_s)
end

def blacklist_keys?

Return true if we can retrieve blacklist keys from the record.
def blacklist_keys?
  @has_except_keys ||= respond_to?(:accessible_attributes) && !accessible_attributes.to_a.empty?
end