Class: V1::User

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/fbuser/v1/user.rb

Instance Method Summary collapse

Instance Method Details

#create_tokenObject



19
20
21
22
# File 'app/models/fbuser/v1/user.rb', line 19

def create_token
  self.tokens.create!
  return true
end

#sanitize_attributesObject



24
25
26
27
28
29
# File 'app/models/fbuser/v1/user.rb', line 24

def sanitize_attributes
  if self.username.nil? || self.username.blank?
    self.username = "username"
  end
  return true
end

#setup_userObject



14
15
16
17
# File 'app/models/fbuser/v1/user.rb', line 14

def setup_user
	create_token
  return true
end