Class: UserDevice

Inherits:
ApplicationRecord show all
Defined in:
app/models/user_device.rb

Overview

typed: ignore

Instance Method Summary collapse

Methods inherited from ApplicationRecord

sync_carrierwave_url

Instance Method Details

#storeObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/models/user_device.rb', line 8

def store
  if save
    true
  else
    if errors.has_key?(:token) &&
       errors[:token].include?('has already been taken')
      true
    else
      false
    end
  end
end