Sha256: 4cdab718ffb1fd09dd6c3cc21ce1d0a4531f829e83373efa3ebfd822e1197f83
Contents?: true
Size: 1016 Bytes
Versions: 4
Compression:
Stored size: 1016 Bytes
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 'volume' '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
4 entries across 4 versions & 1 rubygems