Class: Uomi::Seller
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Uomi::Seller
- Defined in:
- lib/uomi/seller.rb
Class Method Summary collapse
Class Method Details
.for(sellerable) ⇒ Object
6 7 8 |
# File 'lib/uomi/seller.rb', line 6 def self.for(sellerable) Seller.where(sellerable_type: sellerable.class.name, sellerable_id: sellerable.id).first || Seller.create!(sellerable_type: sellerable.class.name, sellerable_id: sellerable.id) end |