Sha256: 8c6a8a5076d00eb8e804809b2e4d6bc186de21a3dc7b750653f75a1b76bf12fd
Contents?: true
Size: 1 KB
Versions: 18
Compression:
Stored size: 1 KB
Contents
class CarrierType < ActiveRecord::Base attr_accessible :name, :display_name, :note, :position include MasterModel default_scope :order => "carrier_types.position" has_many :manifestations if defined?(EnjuCirculation) attr_accessible :carrier_type_has_checkout_types_attributes has_many :carrier_type_has_checkout_types, :dependent => :destroy has_many :checkout_types, :through => :carrier_type_has_checkout_types accepts_nested_attributes_for :carrier_type_has_checkout_types, :allow_destroy => true, :reject_if => :all_blank end def mods_type case name when 'print' 'text' else # TODO: その他のタイプ 'software, multimedia' end end end # == Schema Information # # Table name: carrier_types # # id :integer not null, primary key # name :string(255) not null # display_name :text # note :text # position :integer # created_at :datetime not null # updated_at :datetime not null #
Version data entries
18 entries across 18 versions & 1 rubygems