Class: Blog::Gem::Author
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Blog::Gem::Author
- Includes:
- Gravtastic
- Defined in:
- app/models/blog/gem/author.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.create_admin(name:, password:, email:) ⇒ Object
23 24 25 |
# File 'app/models/blog/gem/author.rb', line 23 def self.create_admin(name:, password:, email:) create(name: name, password: password, password_confirmation: password, private_email: email, public_email: email, admin: true) end |
Instance Method Details
#image ⇒ Object
27 28 29 30 31 32 33 |
# File 'app/models/blog/gem/author.rb', line 27 def image if avatar_or_gravatar == "avatar" avatar.url(:image) else gravatar_url end end |