]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/note_comment.rb
Create an ApplicationRecord for models to inherit from
[rails.git] / app / models / note_comment.rb
index 388f890a67c4fb5ea0939be59cef429475e2ca0a..9611cfe3af375861b865ec17582b0d278fae6c1f 100644 (file)
 #  note_comments_note_id_fkey    (note_id => notes.id)
 #
 
-class NoteComment < ActiveRecord::Base
+class NoteComment < ApplicationRecord
   belongs_to :note, :foreign_key => :note_id, :touch => true
   belongs_to :author, :class_name => "User", :foreign_key => :author_id
 
   validates :id, :uniqueness => true, :presence => { :on => :update },
-                 :numericality => { :on => :update, :integer_only => true }
+                 :numericality => { :on => :update, :only_integer => true }
   validates :note, :presence => true, :associated => true
   validates :visible, :inclusion => [true, false]
   validates :author, :associated => true