Add and inherit from ApplicationRecord to match Rails 5.0 style
This commit is contained in:
parent
8c6d48da86
commit
abe847c0ee
34 changed files with 56 additions and 66 deletions
|
|
@ -1,4 +1,4 @@
|
|||
class Document < ActiveRecord::Base
|
||||
class Document < ApplicationRecord
|
||||
include ActsAsTree
|
||||
|
||||
belongs_to :created_by, class_name: 'User', foreign_key: 'created_by_user_id'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require "base32"
|
||||
|
||||
class Message < ActiveRecord::Base
|
||||
class Message < ApplicationRecord
|
||||
belongs_to :sender, :class_name => "User", :foreign_key => "sender_id"
|
||||
belongs_to :group, :class_name => "Group", :foreign_key => "group_id"
|
||||
belongs_to :reply_to_message, :class_name => "Message", :foreign_key => "reply_to"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class Page < ActiveRecord::Base
|
||||
class Page < ApplicationRecord
|
||||
include ActsAsTree
|
||||
|
||||
belongs_to :user, :foreign_key => 'updated_by'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue