Replace all occurrences of ActiveRecord::Base with ApplicationRecord

This commit is contained in:
Angel Perez
2018-05-03 11:27:48 -04:00
committed by Julian Herrero
parent 7ab602175a
commit 01c1ac2b10
18 changed files with 18 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
class AdminNotification < ActiveRecord::Base
class AdminNotification < ApplicationRecord
include Notifiable
translates :title, touch: true

View File

@@ -1,5 +1,5 @@
class Budget
class Phase < ActiveRecord::Base
class Phase < ApplicationRecord
PHASE_KINDS = %w(drafting informing accepting reviewing selecting valuating publishing_prices balloting
reviewing_ballots finished).freeze
PUBLISHED_PRICES_PHASES = %w(publishing_prices balloting reviewing_ballots finished).freeze

View File

@@ -1,5 +1,5 @@
class Budget
class ValuatorGroupAssignment < ActiveRecord::Base
class ValuatorGroupAssignment < ApplicationRecord
belongs_to :valuator_group, counter_cache: :budget_investments_count
belongs_to :investment, counter_cache: true
end

View File

@@ -1,4 +1,4 @@
class Community < ActiveRecord::Base
class Community < ApplicationRecord
has_one :proposal
has_one :investment, class_name: Budget::Investment
has_many :topics

View File

@@ -1,4 +1,4 @@
class Document < ActiveRecord::Base
class Document < ApplicationRecord
include DocumentsHelper
include DocumentablesHelper
has_attached_file :attachment, url: "/system/:class/:prefix/:style/:hash.:extension",

View File

@@ -1,4 +1,4 @@
class Follow < ActiveRecord::Base
class Follow < ApplicationRecord
belongs_to :user
belongs_to :followable, polymorphic: true

View File

@@ -1,4 +1,4 @@
class Image < ActiveRecord::Base
class Image < ApplicationRecord
include ImagesHelper
include ImageablesHelper

View File

@@ -1,4 +1,4 @@
class Legislation::Proposal < ActiveRecord::Base
class Legislation::Proposal < ApplicationRecord
include ActsAsParanoidAliases
include Flaggable
include Taggable

View File

@@ -1,4 +1,4 @@
class LocalCensusRecord < ActiveRecord::Base
class LocalCensusRecord < ApplicationRecord
validates :document_number, presence: true
validates :document_type, presence: true
validates :date_of_birth, presence: true

View File

@@ -1,4 +1,4 @@
class MapLocation < ActiveRecord::Base
class MapLocation < ApplicationRecord
belongs_to :proposal, touch: true
belongs_to :investment, class_name: Budget::Investment, touch: true

View File

@@ -1,4 +1,4 @@
class Newsletter < ActiveRecord::Base
class Newsletter < ApplicationRecord
has_many :activities, as: :actionable
validates :subject, presence: true

View File

@@ -1,4 +1,4 @@
class Poll::Question::Answer < ActiveRecord::Base
class Poll::Question::Answer < ApplicationRecord
include Galleryable
include Documentable

View File

@@ -1,4 +1,4 @@
class Poll::Question::Answer::Video < ActiveRecord::Base
class Poll::Question::Answer::Video < ApplicationRecord
belongs_to :answer, class_name: "Poll::Question::Answer", foreign_key: "answer_id"
VIMEO_REGEX = /vimeo.*(staffpicks\/|channels\/|videos\/|video\/|\/)([^#\&\?]*).*/

View File

@@ -1,5 +1,5 @@
class Poll
class Shift < ActiveRecord::Base
class Shift < ApplicationRecord
belongs_to :booth
belongs_to :officer

View File

@@ -1,4 +1,4 @@
class RelatedContent < ActiveRecord::Base
class RelatedContent < ApplicationRecord
RELATED_CONTENT_SCORE_THRESHOLD = Setting["related_content_score_threshold"].to_f
RELATIONABLE_MODELS = %w{proposals debates budgets investments}.freeze

View File

@@ -1,4 +1,4 @@
class RelatedContentScore < ActiveRecord::Base
class RelatedContentScore < ApplicationRecord
SCORES = {
POSITIVE: 1,
NEGATIVE: -1

View File

@@ -1,4 +1,4 @@
class Topic < ActiveRecord::Base
class Topic < ApplicationRecord
acts_as_paranoid column: :hidden_at
include ActsAsParanoidAliases
include Notifiable

View File

@@ -1,4 +1,4 @@
class ValuatorGroup < ActiveRecord::Base
class ValuatorGroup < ApplicationRecord
has_many :valuators
has_many :valuator_group_assignments, dependent: :destroy, class_name: "Budget::ValuatorGroupAssignment"
has_many :investments, through: :valuator_group_assignments, class_name: "Budget::Investment"