Class: Spree::Supplier
- Inherits:
-
Base
- Object
- Base
- Spree::Supplier
- Extended by:
- FriendlyId
- Defined in:
- app/models/spree/supplier.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
Instance Method Summary collapse
- #deleted? ⇒ Boolean
-
#stock_locations_with_available_stock_items(variant) ⇒ Object
Retreive the stock locations that has available stock items of the given variant.
- #user_ids_string ⇒ Object
- #user_ids_string=(s) ⇒ Object
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'app/models/spree/supplier.rb', line 6 def password @password end |
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
6 7 8 |
# File 'app/models/spree/supplier.rb', line 6 def password_confirmation @password_confirmation end |
Instance Method Details
#deleted? ⇒ Boolean
49 50 51 |
# File 'app/models/spree/supplier.rb', line 49 def deleted? deleted_at.present? end |
#stock_locations_with_available_stock_items(variant) ⇒ Object
Retreive the stock locations that has available stock items of the given variant
63 64 65 |
# File 'app/models/spree/supplier.rb', line 63 def stock_locations_with_available_stock_items(variant) stock_locations.select { |sl| sl.available?(variant) } end |
#user_ids_string ⇒ Object
53 54 55 |
# File 'app/models/spree/supplier.rb', line 53 def user_ids_string user_ids.join(',') end |
#user_ids_string=(s) ⇒ Object
57 58 59 |
# File 'app/models/spree/supplier.rb', line 57 def user_ids_string=(s) self.user_ids = s.to_s.split(',').map(&:strip) end |