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

@@ -11,14 +11,14 @@ class Legislation::DraftVersion < ActiveRecord::Base
translates :toc_html, touch: true
include Globalizable
belongs_to :process, class_name: 'Legislation::Process', foreign_key: 'legislation_process_id'
has_many :annotations, class_name: 'Legislation::Annotation', foreign_key: 'legislation_draft_version_id', dependent: :destroy
belongs_to :process, class_name: "Legislation::Process", foreign_key: "legislation_process_id"
has_many :annotations, class_name: "Legislation::Annotation", foreign_key: "legislation_draft_version_id", dependent: :destroy
validates_translation :title, presence: true
validates_translation :body, presence: true
validates :status, presence: true, inclusion: { in: VALID_STATUSES }
scope :published, -> { where(status: 'published').order('id DESC') }
scope :published, -> { where(status: "published").order("id DESC") }
before_save :render_html
@@ -40,7 +40,7 @@ class Legislation::DraftVersion < ActiveRecord::Base
end
def display_title
status == 'draft' ? "#{title} *" : title
status == "draft" ? "#{title} *" : title
end
def total_comments