Inherit models from ApplicationRecord instead of ActiveRecord::Base.

This commit is contained in:
evazion
2017-06-14 21:27:53 -05:00
parent 56b1651cd4
commit c1834ab8dd
54 changed files with 56 additions and 53 deletions

View File

@@ -1,4 +1,4 @@
class IpBan < ActiveRecord::Base
class IpBan < ApplicationRecord
IP_ADDR_REGEX = /\A(?:[0-9]{1,3}\.){3}[0-9]{1,3}\Z/
belongs_to :creator, :class_name => "User"
before_validation :initialize_creator, :on => :create