Class: Comable::Store

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Liquidable
Defined in:
app/models/comable/store.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.default_nameObject



21
22
23
# File 'app/models/comable/store.rb', line 21

def default_name
  Comable.t('default_store_name')
end

.instanceObject



17
18
19
# File 'app/models/comable/store.rb', line 17

def instance
  first || new(name: default_name)
end

Instance Method Details

#can_send_mail?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'app/models/comable/store.rb', line 26

def can_send_mail?
  email.present?
end