Add frozen_string_literal magic comment

re: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FrozenStringLiteralComment
This commit is contained in:
James Mason 2018-05-07 16:47:29 -07:00
parent dd0a52cca9
commit 6d31dfeef4
568 changed files with 1134 additions and 0 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Ability
include CanCan::Ability

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AdminAbility
include CanCan::Ability

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Ahoy
class Event < ApplicationRecord
self.table_name = 'ahoy_events'

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Answer < ApplicationRecord
has_many :qanswers
has_many :questions, through: :qanswers

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Booth < ApplicationRecord
include ActiveRecord::Transitions
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class BoothRequest < ApplicationRecord
belongs_to :booth
belongs_to :user

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Campaign < ApplicationRecord
validates :name, :utm_campaign, presence: true

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
# cannot delete program if there are events submitted
class Cfp < ApplicationRecord

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Comment < ApplicationRecord
acts_as_nested_set scope: %i(commentable_id commentable_type)
validates :body, presence: true

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Commercial < ApplicationRecord
require 'oembed'

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module RevisionCount
extend ActiveSupport::Concern

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Conference < ApplicationRecord
include RevisionCount
require 'uri'

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Contact < ApplicationRecord
has_paper_trail on: [:update], ignore: [:updated_at], meta: { conference_id: :conference_id }

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class DifficultyLevel < ApplicationRecord
belongs_to :program, touch: true
has_many :events, dependent: :nullify

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class EmailSettings < ApplicationRecord
belongs_to :conference

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Event < ApplicationRecord
include ActiveRecord::Transitions
include RevisionCount

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class EventSchedule < ApplicationRecord
default_scope { where(enabled: true) }
belongs_to :schedule

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class EventType < ApplicationRecord
belongs_to :program, touch: true
has_many :events, dependent: :restrict_with_error

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class EventUser < ApplicationRecord
# TODO: Do we need these roles?
ROLES = [%w[Speaker speaker], %w[Submitter submitter], %w[Moderator moderator]]

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class EventsRegistration < ApplicationRecord
belongs_to :registration
belongs_to :event

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Lodging < ApplicationRecord
belongs_to :conference

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Openid < ApplicationRecord
belongs_to :user
validates :provider, :uid, :email, presence: true

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Organization < ApplicationRecord
resourcify :roles, dependent: :delete_all

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Payment < ApplicationRecord
has_many :ticket_purchases
belongs_to :user

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class PhysicalTicket < ApplicationRecord
belongs_to :ticket_purchase
has_one :ticket, through: :ticket_purchase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
# cannot delete program if there are events submitted
class Program < ApplicationRecord

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Qanswer < ApplicationRecord
belongs_to :question
belongs_to :answer, dependent: :delete

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Question < ApplicationRecord
belongs_to :question_type
has_and_belongs_to_many :conferences

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class QuestionType < ApplicationRecord
has_many :questions
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Registration < ApplicationRecord
require 'csv'
belongs_to :user

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class RegistrationPeriod < ApplicationRecord
belongs_to :conference

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Resource < ApplicationRecord
belongs_to :conference
validates :name, :used, :quantity, presence: true

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Role < ApplicationRecord
belongs_to :resource, polymorphic: true
has_many :users_roles

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Room < ApplicationRecord
include RevisionCount
belongs_to :venue

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Schedule < ApplicationRecord
belongs_to :program
belongs_to :track

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Splashpage < ApplicationRecord
belongs_to :conference

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Sponsor < ApplicationRecord
belongs_to :sponsorship_level
belongs_to :conference

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class SponsorshipLevel < ApplicationRecord
validates :title, presence: true
belongs_to :conference

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Subscription < ApplicationRecord
belongs_to :conference
belongs_to :user

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Target < ApplicationRecord
include ActionView::Helpers::TextHelper

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Ticket < ApplicationRecord
belongs_to :conference
has_many :ticket_purchases, dependent: :destroy

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class TicketPurchase < ApplicationRecord
belongs_to :ticket
belongs_to :user

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class TicketScanning < ApplicationRecord
belongs_to :physical_ticket

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Track < ApplicationRecord
include ActiveRecord::Transitions
include RevisionCount

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class IChainRecordNotFound < StandardError
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class UsersRole < ApplicationRecord
belongs_to :role
belongs_to :user

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Vchoice < ApplicationRecord
belongs_to :vday
belongs_to :vposition

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Vday < ApplicationRecord
belongs_to :conference

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Venue < ApplicationRecord
belongs_to :conference
has_one :commercial, as: :commercialable, dependent: :destroy

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Visit < ApplicationRecord
has_many :ahoy_events, class_name: 'Ahoy::Event'
belongs_to :user

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Vote < ApplicationRecord
belongs_to :user
belongs_to :event

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class Vposition < ApplicationRecord
belongs_to :conference