Use double quotes in models
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user