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

@@ -22,8 +22,8 @@ class Legislation::Proposal < ActiveRecord::Base
acts_as_votable
acts_as_paranoid column: :hidden_at
belongs_to :process, class_name: 'Legislation::Process', foreign_key: 'legislation_process_id'
belongs_to :author, -> { with_hidden }, class_name: 'User', foreign_key: 'author_id'
belongs_to :process, class_name: "Legislation::Process", foreign_key: "legislation_process_id"
belongs_to :author, -> { with_hidden }, class_name: "User", foreign_key: "author_id"
belongs_to :geozone
has_many :comments, as: :commentable
@@ -59,13 +59,13 @@ class Legislation::Proposal < ActiveRecord::Base
end
def searchable_values
{ title => 'A',
question => 'B',
author.username => 'B',
tag_list.join(' ') => 'B',
geozone.try(:name) => 'B',
summary => 'C',
description => 'D'}
{ title => "A",
question => "B",
author.username => "B",
tag_list.join(" ") => "B",
geozone.try(:name) => "B",
summary => "C",
description => "D"}
end
def self.search(terms)
@@ -136,11 +136,11 @@ class Legislation::Proposal < ActiveRecord::Base
end
def after_hide
tags.each{ |t| t.decrement_custom_counter_for('LegislationProposal') }
tags.each{ |t| t.decrement_custom_counter_for("LegislationProposal") }
end
def after_restore
tags.each{ |t| t.increment_custom_counter_for('LegislationProposal') }
tags.each{ |t| t.increment_custom_counter_for("LegislationProposal") }
end
protected