Class: BlogBasic::User

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_with_omniauth(auth) ⇒ Object



4
5
6
7
8
9
10
# File 'app/models/blog_basic/user.rb', line 4

def self.create_with_omniauth(auth)
  create! do |user|
    user.provider = auth["provider"]
    user.uid = auth["uid"]
    user.name = auth["user_info"]["name"]
  end
end

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)


12
13
14
15
# File 'app/models/blog_basic/user.rb', line 12

def admin?
  #self.email == "[email protected]"
  !self.identifier_url.nil?
end

#nameObject



17
18
19
# File 'app/models/blog_basic/user.rb', line 17

def name
  "Arvid Bottiger"
end