Class: Basket
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Basket
- Defined in:
- app/models/basket.rb
Instance Attribute Summary collapse
-
#user_number ⇒ Object
Returns the value of attribute user_number.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#user_number ⇒ Object
Returns the value of attribute user_number.
15 16 17 |
# File 'app/models/basket.rb', line 15 def user_number @user_number end |
Class Method Details
.expire ⇒ Object
25 26 27 28 |
# File 'app/models/basket.rb', line 25 def self.expire Basket.will_expire(Time.zone.now.beginning_of_day).destroy_all logger.info "#{Time.zone.now} baskets expired!" end |
Instance Method Details
#check_suspended ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/models/basket.rb', line 17 def check_suspended if user errors[:base] << I18n.t('basket.this_account_is_suspended') if user.locked_at else errors[:base] << I18n.t('user.not_found') end end |