Inherit models from ApplicationRecord instead of ActiveRecord::Base.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
require 'base64'
|
require 'base64'
|
||||||
require 'digest/md5'
|
require 'digest/md5'
|
||||||
|
|
||||||
class AmazonBackup < ActiveRecord::Base
|
class AmazonBackup < ApplicationRecord
|
||||||
attr_accessible :last_id
|
attr_accessible :last_id
|
||||||
|
|
||||||
def self.last_id
|
def self.last_id
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ApiKey < ActiveRecord::Base
|
class ApiKey < ApplicationRecord
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
validates_uniqueness_of :user_id
|
validates_uniqueness_of :user_id
|
||||||
validates_uniqueness_of :key
|
validates_uniqueness_of :key
|
||||||
|
|||||||
3
app/models/application_record.rb
Normal file
3
app/models/application_record.rb
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
class ApplicationRecord < ActiveRecord::Base
|
||||||
|
self.abstract_class = true
|
||||||
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class Artist < ActiveRecord::Base
|
class Artist < ApplicationRecord
|
||||||
extend Memoist
|
extend Memoist
|
||||||
class RevertError < Exception ; end
|
class RevertError < Exception ; end
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ArtistCommentary < ActiveRecord::Base
|
class ArtistCommentary < ApplicationRecord
|
||||||
class RevertError < Exception ; end
|
class RevertError < Exception ; end
|
||||||
|
|
||||||
attr_accessor :remove_commentary_tag, :remove_commentary_request_tag, :remove_commentary_check_tag
|
attr_accessor :remove_commentary_tag, :remove_commentary_request_tag, :remove_commentary_check_tag
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ArtistCommentaryVersion < ActiveRecord::Base
|
class ArtistCommentaryVersion < ApplicationRecord
|
||||||
before_validation :initialize_updater
|
before_validation :initialize_updater
|
||||||
belongs_to :updater, :class_name => "User"
|
belongs_to :updater, :class_name => "User"
|
||||||
scope :for_user, lambda {|user_id| where("updater_id = ?", user_id)}
|
scope :for_user, lambda {|user_id| where("updater_id = ?", user_id)}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ArtistUrl < ActiveRecord::Base
|
class ArtistUrl < ApplicationRecord
|
||||||
before_save :initialize_normalized_url, on: [ :create ]
|
before_save :initialize_normalized_url, on: [ :create ]
|
||||||
before_save :normalize
|
before_save :normalize
|
||||||
validates_presence_of :url
|
validates_presence_of :url
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ArtistVersion < ActiveRecord::Base
|
class ArtistVersion < ApplicationRecord
|
||||||
belongs_to :updater, :class_name => "User"
|
belongs_to :updater, :class_name => "User"
|
||||||
belongs_to :artist
|
belongs_to :artist
|
||||||
attr_accessible :artist_id, :name, :is_active, :other_names, :group_name, :url_string, :is_banned, :updater_id, :updater_ip_addr
|
attr_accessible :artist_id, :name, :is_active, :other_names, :group_name, :url_string, :is_banned, :updater_id, :updater_ip_addr
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Ban < ActiveRecord::Base
|
class Ban < ApplicationRecord
|
||||||
after_create :update_feedback
|
after_create :update_feedback
|
||||||
after_create :update_user_on_create
|
after_create :update_user_on_create
|
||||||
after_create :create_mod_action
|
after_create :create_mod_action
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class BulkUpdateRequest < ActiveRecord::Base
|
class BulkUpdateRequest < ApplicationRecord
|
||||||
attr_accessor :reason, :skip_secondary_validations
|
attr_accessor :reason, :skip_secondary_validations
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Comment < ActiveRecord::Base
|
class Comment < ApplicationRecord
|
||||||
include Mentionable
|
include Mentionable
|
||||||
|
|
||||||
validate :validate_post_exists, :on => :create
|
validate :validate_post_exists, :on => :create
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class CommentVote < ActiveRecord::Base
|
class CommentVote < ApplicationRecord
|
||||||
class Error < Exception ; end
|
class Error < Exception ; end
|
||||||
|
|
||||||
belongs_to :comment
|
belongs_to :comment
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
require 'digest/sha1'
|
require 'digest/sha1'
|
||||||
|
|
||||||
class Dmail < ActiveRecord::Base
|
class Dmail < ApplicationRecord
|
||||||
with_options on: :create do
|
with_options on: :create do
|
||||||
validates_presence_of :to_id
|
validates_presence_of :to_id
|
||||||
validates_presence_of :from_id
|
validates_presence_of :from_id
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class DmailFilter < ActiveRecord::Base
|
class DmailFilter < ApplicationRecord
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
attr_accessible :words, :as => [:moderator, :gold, :platinum, :member, :anonymous, :default, :builder, :admin]
|
attr_accessible :words, :as => [:moderator, :gold, :platinum, :member, :anonymous, :default, :builder, :admin]
|
||||||
validates_presence_of :user
|
validates_presence_of :user
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Favorite < ActiveRecord::Base
|
class Favorite < ApplicationRecord
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
scope :for_user, lambda {|user_id| where("user_id % 100 = #{user_id.to_i % 100} and user_id = #{user_id.to_i}")}
|
scope :for_user, lambda {|user_id| where("user_id % 100 = #{user_id.to_i % 100} and user_id = #{user_id.to_i}")}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
require 'ostruct'
|
require 'ostruct'
|
||||||
|
|
||||||
class FavoriteGroup < ActiveRecord::Base
|
class FavoriteGroup < ApplicationRecord
|
||||||
validates_uniqueness_of :name, :case_sensitive => false, :scope => :creator_id
|
validates_uniqueness_of :name, :case_sensitive => false, :scope => :creator_id
|
||||||
validates_format_of :name, :with => /\A[^,]+\Z/, :message => "cannot have commas"
|
validates_format_of :name, :with => /\A[^,]+\Z/, :message => "cannot have commas"
|
||||||
belongs_to :creator, :class_name => "User"
|
belongs_to :creator, :class_name => "User"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ForumPost < ActiveRecord::Base
|
class ForumPost < ApplicationRecord
|
||||||
include Mentionable
|
include Mentionable
|
||||||
|
|
||||||
attr_accessible :body, :topic_id, :as => [:member, :builder, :gold, :platinum, :admin, :moderator, :default]
|
attr_accessible :body, :topic_id, :as => [:member, :builder, :gold, :platinum, :admin, :moderator, :default]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ForumSubscription < ActiveRecord::Base
|
class ForumSubscription < ApplicationRecord
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :forum_topic
|
belongs_to :forum_topic
|
||||||
attr_accessible :user, :forum_topic, :user_id, :forum_topic_id, :last_read_at, :delete_key
|
attr_accessible :user, :forum_topic, :user_id, :forum_topic_id, :last_read_at, :delete_key
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ForumTopic < ActiveRecord::Base
|
class ForumTopic < ApplicationRecord
|
||||||
CATEGORIES = {
|
CATEGORIES = {
|
||||||
0 => "General",
|
0 => "General",
|
||||||
1 => "Tags",
|
1 => "Tags",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ForumTopicVisit < ActiveRecord::Base
|
class ForumTopicVisit < ApplicationRecord
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :forum_topic
|
belongs_to :forum_topic
|
||||||
attr_accessible :user_id, :user, :forum_topic_id, :forum_topic, :last_read_at
|
attr_accessible :user_id, :user, :forum_topic_id, :forum_topic, :last_read_at
|
||||||
|
|||||||
@@ -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/
|
IP_ADDR_REGEX = /\A(?:[0-9]{1,3}\.){3}[0-9]{1,3}\Z/
|
||||||
belongs_to :creator, :class_name => "User"
|
belongs_to :creator, :class_name => "User"
|
||||||
before_validation :initialize_creator, :on => :create
|
before_validation :initialize_creator, :on => :create
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class JanitorTrial < ActiveRecord::Base
|
class JanitorTrial < ApplicationRecord
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
after_create :send_dmail
|
after_create :send_dmail
|
||||||
after_create :promote_user
|
after_create :promote_user
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class KeyValue < ActiveRecord::Base
|
class KeyValue < ApplicationRecord
|
||||||
validates_uniqueness_of :key
|
validates_uniqueness_of :key
|
||||||
attr_accessible :key, :value
|
attr_accessible :key, :value
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class ModAction < ActiveRecord::Base
|
class ModAction < ApplicationRecord
|
||||||
belongs_to :creator, :class_name => "User"
|
belongs_to :creator, :class_name => "User"
|
||||||
before_validation :initialize_creator, :on => :create
|
before_validation :initialize_creator, :on => :create
|
||||||
validates_presence_of :creator_id
|
validates_presence_of :creator_id
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class NewsUpdate < ActiveRecord::Base
|
class NewsUpdate < ApplicationRecord
|
||||||
belongs_to :creator, :class_name => "User"
|
belongs_to :creator, :class_name => "User"
|
||||||
belongs_to :updater, :class_name => "User"
|
belongs_to :updater, :class_name => "User"
|
||||||
scope :recent, lambda {where("created_at >= ?", 2.weeks.ago).order("created_at desc").limit(5)}
|
scope :recent, lambda {where("created_at >= ?", 2.weeks.ago).order("created_at desc").limit(5)}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Note < ActiveRecord::Base
|
class Note < ApplicationRecord
|
||||||
class RevertError < Exception ; end
|
class RevertError < Exception ; end
|
||||||
|
|
||||||
attr_accessor :updater_id, :updater_ip_addr, :html_id
|
attr_accessor :updater_id, :updater_ip_addr, :html_id
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class NoteVersion < ActiveRecord::Base
|
class NoteVersion < ApplicationRecord
|
||||||
before_validation :initialize_updater
|
before_validation :initialize_updater
|
||||||
belongs_to :updater, :class_name => "User"
|
belongs_to :updater, :class_name => "User"
|
||||||
scope :for_user, lambda {|user_id| where("updater_id = ?", user_id)}
|
scope :for_user, lambda {|user_id| where("updater_id = ?", user_id)}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PixivUgoiraFrameData < ActiveRecord::Base
|
class PixivUgoiraFrameData < ApplicationRecord
|
||||||
attr_accessible :post_id, :data, :content_type
|
attr_accessible :post_id, :data, :content_type
|
||||||
serialize :data
|
serialize :data
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
require 'ostruct'
|
require 'ostruct'
|
||||||
|
|
||||||
class Pool < ActiveRecord::Base
|
class Pool < ApplicationRecord
|
||||||
class RevertError < Exception ; end
|
class RevertError < Exception ; end
|
||||||
|
|
||||||
validates_uniqueness_of :name, :case_sensitive => false
|
validates_uniqueness_of :name, :case_sensitive => false
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PoolArchive < ActiveRecord::Base
|
class PoolArchive < ApplicationRecord
|
||||||
|
|
||||||
belongs_to :updater, :class_name => "User"
|
belongs_to :updater, :class_name => "User"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PoolVersion < ActiveRecord::Base
|
class PoolVersion < ApplicationRecord
|
||||||
class Error < Exception ; end
|
class Error < Exception ; end
|
||||||
|
|
||||||
validates_presence_of :updater_id, :updater_ip_addr
|
validates_presence_of :updater_id, :updater_ip_addr
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
require 'danbooru/has_bit_flags'
|
require 'danbooru/has_bit_flags'
|
||||||
require 'google/apis/pubsub_v1'
|
require 'google/apis/pubsub_v1'
|
||||||
|
|
||||||
class Post < ActiveRecord::Base
|
class Post < ApplicationRecord
|
||||||
class ApprovalError < Exception ; end
|
class ApprovalError < Exception ; end
|
||||||
class DisapprovalError < Exception ; end
|
class DisapprovalError < Exception ; end
|
||||||
class RevertError < Exception ; end
|
class RevertError < Exception ; end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PostAppeal < ActiveRecord::Base
|
class PostAppeal < ApplicationRecord
|
||||||
class Error < Exception ; end
|
class Error < Exception ; end
|
||||||
|
|
||||||
belongs_to :creator, :class_name => "User"
|
belongs_to :creator, :class_name => "User"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PostApproval < ActiveRecord::Base
|
class PostApproval < ApplicationRecord
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :post, inverse_of: :approvals
|
belongs_to :post, inverse_of: :approvals
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PostArchive < ActiveRecord::Base
|
class PostArchive < ApplicationRecord
|
||||||
extend Memoist
|
extend Memoist
|
||||||
|
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PostDisapproval < ActiveRecord::Base
|
class PostDisapproval < ApplicationRecord
|
||||||
DELETION_THRESHOLD = 1.month
|
DELETION_THRESHOLD = 1.month
|
||||||
|
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PostFlag < ActiveRecord::Base
|
class PostFlag < ApplicationRecord
|
||||||
class Error < Exception ; end
|
class Error < Exception ; end
|
||||||
|
|
||||||
module Reasons
|
module Reasons
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PostReplacement < ActiveRecord::Base
|
class PostReplacement < ApplicationRecord
|
||||||
DELETION_GRACE_PERIOD = 30.days
|
DELETION_GRACE_PERIOD = 30.days
|
||||||
|
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PostVersion < ActiveRecord::Base
|
class PostVersion < ApplicationRecord
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
belongs_to :updater, :class_name => "User"
|
belongs_to :updater, :class_name => "User"
|
||||||
before_validation :initialize_updater
|
before_validation :initialize_updater
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class PostVote < ActiveRecord::Base
|
class PostVote < ApplicationRecord
|
||||||
class Error < Exception ; end
|
class Error < Exception ; end
|
||||||
|
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class SavedSearch < ActiveRecord::Base
|
class SavedSearch < ApplicationRecord
|
||||||
module ListbooruMethods
|
module ListbooruMethods
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class SuperVoter < ActiveRecord::Base
|
class SuperVoter < ApplicationRecord
|
||||||
MAGNITUDE = 3
|
MAGNITUDE = 3
|
||||||
DURATION = 1.week
|
DURATION = 1.week
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Tag < ActiveRecord::Base
|
class Tag < ApplicationRecord
|
||||||
COSINE_SIMILARITY_RELATED_TAG_THRESHOLD = 1000
|
COSINE_SIMILARITY_RELATED_TAG_THRESHOLD = 1000
|
||||||
METATAGS = "-user|user|-approver|approver|commenter|comm|noter|noteupdater|artcomm|-pool|pool|ordpool|-favgroup|favgroup|-fav|fav|ordfav|sub|md5|-rating|rating|-locked|locked|width|height|mpixels|ratio|score|favcount|filesize|source|-source|id|-id|date|age|order|limit|-status|status|tagcount|gentags|arttags|chartags|copytags|parent|-parent|child|pixiv_id|pixiv|search|upvote|downvote|filetype|-filetype|flagger|-flagger|appealer|-appealer"
|
METATAGS = "-user|user|-approver|approver|commenter|comm|noter|noteupdater|artcomm|-pool|pool|ordpool|-favgroup|favgroup|-fav|fav|ordfav|sub|md5|-rating|rating|-locked|locked|width|height|mpixels|ratio|score|favcount|filesize|source|-source|id|-id|date|age|order|limit|-status|status|tagcount|gentags|arttags|chartags|copytags|parent|-parent|child|pixiv_id|pixiv|search|upvote|downvote|filetype|-filetype|flagger|-flagger|appealer|-appealer"
|
||||||
SUBQUERY_METATAGS = "commenter|comm|noter|noteupdater|artcomm|flagger|-flagger|appealer|-appealer"
|
SUBQUERY_METATAGS = "commenter|comm|noter|noteupdater|artcomm|flagger|-flagger|appealer|-appealer"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class TagAlias < ActiveRecord::Base
|
class TagAlias < ApplicationRecord
|
||||||
attr_accessor :skip_secondary_validations
|
attr_accessor :skip_secondary_validations
|
||||||
|
|
||||||
before_save :ensure_tags_exist
|
before_save :ensure_tags_exist
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class TagImplication < ActiveRecord::Base
|
class TagImplication < ApplicationRecord
|
||||||
attr_accessor :skip_secondary_validations
|
attr_accessor :skip_secondary_validations
|
||||||
|
|
||||||
before_save :update_descendant_names
|
before_save :update_descendant_names
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class TagSubscription < ActiveRecord::Base
|
class TagSubscription < ApplicationRecord
|
||||||
belongs_to :creator, :class_name => "User"
|
belongs_to :creator, :class_name => "User"
|
||||||
before_validation :initialize_creator, :on => :create
|
before_validation :initialize_creator, :on => :create
|
||||||
before_validation :initialize_post_ids, :on => :create
|
before_validation :initialize_post_ids, :on => :create
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class TokenBucket < ActiveRecord::Base
|
class TokenBucket < ApplicationRecord
|
||||||
self.primary_key = "user_id"
|
self.primary_key = "user_id"
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
require "danbooru_image_resizer/danbooru_image_resizer"
|
require "danbooru_image_resizer/danbooru_image_resizer"
|
||||||
require "tmpdir"
|
require "tmpdir"
|
||||||
|
|
||||||
class Upload < ActiveRecord::Base
|
class Upload < ApplicationRecord
|
||||||
class Error < Exception ; end
|
class Error < Exception ; end
|
||||||
|
|
||||||
attr_accessor :file, :image_width, :image_height, :file_ext, :md5,
|
attr_accessor :file, :image_width, :image_height, :file_ext, :md5,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
require 'digest/sha1'
|
require 'digest/sha1'
|
||||||
require 'danbooru/has_bit_flags'
|
require 'danbooru/has_bit_flags'
|
||||||
|
|
||||||
class User < ActiveRecord::Base
|
class User < ApplicationRecord
|
||||||
class Error < Exception ; end
|
class Error < Exception ; end
|
||||||
class PrivilegeError < Exception ; end
|
class PrivilegeError < Exception ; end
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class UserFeedback < ActiveRecord::Base
|
class UserFeedback < ApplicationRecord
|
||||||
self.table_name = "user_feedback"
|
self.table_name = "user_feedback"
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :creator, :class_name => "User"
|
belongs_to :creator, :class_name => "User"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class UserNameChangeRequest < ActiveRecord::Base
|
class UserNameChangeRequest < ApplicationRecord
|
||||||
validates_presence_of :user_id, :original_name, :desired_name
|
validates_presence_of :user_id, :original_name, :desired_name
|
||||||
validates_inclusion_of :status, :in => %w(pending approved rejected)
|
validates_inclusion_of :status, :in => %w(pending approved rejected)
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class UserPasswordResetNonce < ActiveRecord::Base
|
class UserPasswordResetNonce < ApplicationRecord
|
||||||
validates_presence_of :email, :key
|
validates_presence_of :email, :key
|
||||||
validate :validate_existence_of_email
|
validate :validate_existence_of_email
|
||||||
before_validation :initialize_key, :on => :create
|
before_validation :initialize_key, :on => :create
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class WikiPage < ActiveRecord::Base
|
class WikiPage < ApplicationRecord
|
||||||
class RevertError < Exception ; end
|
class RevertError < Exception ; end
|
||||||
|
|
||||||
before_save :normalize_title
|
before_save :normalize_title
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class WikiPageVersion < ActiveRecord::Base
|
class WikiPageVersion < ApplicationRecord
|
||||||
belongs_to :wiki_page
|
belongs_to :wiki_page
|
||||||
belongs_to :updater, :class_name => "User"
|
belongs_to :updater, :class_name => "User"
|
||||||
belongs_to :artist
|
belongs_to :artist
|
||||||
|
|||||||
Reference in New Issue
Block a user