Use double quotes in models

This commit is contained in:
Julian Herrero
2019-03-13 22:57:47 +01:00
parent 3c313c9c52
commit 3ba961a2d7
57 changed files with 241 additions and 241 deletions

View File

@@ -1,14 +1,14 @@
class RelatedContent < ActiveRecord::Base
RELATED_CONTENT_SCORE_THRESHOLD = Setting['related_content_score_threshold'].to_f
RELATED_CONTENT_SCORE_THRESHOLD = Setting["related_content_score_threshold"].to_f
RELATIONABLE_MODELS = %w{proposals debates budgets investments}.freeze
acts_as_paranoid column: :hidden_at
include ActsAsParanoidAliases
belongs_to :author, class_name: 'User', foreign_key: 'author_id'
belongs_to :author, class_name: "User", foreign_key: "author_id"
belongs_to :parent_relationable, polymorphic: true, touch: true
belongs_to :child_relationable, polymorphic: true, touch: true
has_one :opposite_related_content, class_name: 'RelatedContent', foreign_key: :related_content_id
has_one :opposite_related_content, class_name: "RelatedContent", foreign_key: :related_content_id
has_many :related_content_scores
validates :parent_relationable_id, presence: true