Sha256: f8538dc78f6baacbdba684b66f376cfc77a7eef1e5124e779ebea15d02416bee

Contents?: true

Size: 618 Bytes

Versions: 3

Compression:

Stored size: 618 Bytes

Contents

class RequestType < ActiveRecord::Base
  attr_accessible :name, :display_name, :note
  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('request_types.position') }

  private
  def valid_name?
    true
  end
end

# == Schema Information
#
# Table name: request_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

3 entries across 3 versions & 1 rubygems

Version Path
enju_library-0.1.0.pre39 app/models/request_type.rb
enju_library-0.1.0.pre38 app/models/request_type.rb
enju_library-0.1.0.pre37 app/models/request_type.rb