Sha256: b8e40b246bf99b3bfd7655f2644f68dcc979a726f586f84ea87a223da59b892a
Contents?: true
Size: 573 Bytes
Versions: 4
Compression:
Stored size: 573 Bytes
Contents
class BudgetType < ActiveRecord::Base include MasterModel validates :name, presence: true, format: { with: /\A[0-9A-Za-z][0-9A-Za-z_\-\s,]*[0-9a-z]\Z/ } default_scope { order('budget_types.position') } has_many :items private def valid_name? true end end # == Schema Information # # Table name: budget_types # # id :integer not null, primary key # name :string(255) # 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