Class: ShopDiscountable

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/shop_discountable.rb

Class Method Summary collapse

Class Method Details

.for(type) ⇒ Object

Returns discount of a class



14
15
16
# File 'app/models/shop_discountable.rb', line 14

def self.for(type)
  all(:conditions => { :discounted_type => type.pluralize.classify })
end