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

Version Path
enju_library-0.1.0.pre43 app/models/budget_type.rb
enju_library-0.1.0.pre42 app/models/budget_type.rb
enju_library-0.1.0.pre41 app/models/budget_type.rb
enju_library-0.1.0.pre40 app/models/budget_type.rb