Module: DeviseTokenAuth::Concerns::MongoidSupport

Extended by:
ActiveSupport::Concern
Defined in:
app/models/devise_token_auth/concerns/mongoid_support.rb

Instance Method Summary collapse

Instance Method Details

#as_json(options = {}) ⇒ Object



4
5
6
7
8
9
# File 'app/models/devise_token_auth/concerns/mongoid_support.rb', line 4

def as_json(options = {})
  options[:except] = (options[:except] || []) + [:_id]
  hash = super(options)
  hash['id'] = to_param
  hash
end