Sha256: 58651755e5353b82a03b0dc4bcd9a199fa9c403d51e1a2b835b0d73d7bb87c2b
Contents?: true
Size: 504 Bytes
Versions: 16
Compression:
Stored size: 504 Bytes
Contents
class EveApp::ActivityMaterial < EveApp::ApplicationRecord include EveApp::ActivityRelation belongs_to :material_type, class_name: 'EveApp::Type', foreign_key: :material_type_id scope :buildable, -> { joins(:material_type).where.not(eve_types: { blueprint_type_id: nil }) } scope :simple, -> { joins(:material_type).where(eve_types: { blueprint_type_id: nil }) } # scope :order_by_quantity, -> { order(quantity: :desc) } def quantity_for(runs) runs > 0 ? runs * quantity : 0 end end
Version data entries
16 entries across 16 versions & 1 rubygems