cirandas.net

ref: master

plugins/tolerance_time/lib/tolerance_time_plugin/tolerance.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
class ToleranceTimePlugin::Tolerance < ApplicationRecord

  belongs_to :profile
  validates_presence_of :profile_id
  validates_uniqueness_of :profile_id
  validates_numericality_of :content_tolerance, :only_integer => true, :allow_nil => true
  validates_numericality_of :comment_tolerance, :only_integer => true, :allow_nil => true
  attr_accessible :profile, :content_tolerance, :comment_tolerance

end