Inherit models from ApplicationRecord instead of ActiveRecord::Base.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user