Inherit models from ApplicationRecord instead of ActiveRecord::Base.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
class NewsUpdate < ActiveRecord::Base
|
||||
class NewsUpdate < ApplicationRecord
|
||||
belongs_to :creator, :class_name => "User"
|
||||
belongs_to :updater, :class_name => "User"
|
||||
scope :recent, lambda {where("created_at >= ?", 2.weeks.ago).order("created_at desc").limit(5)}
|
||||
|
||||
Reference in New Issue
Block a user