Add frozen_string_literal magic comment
re: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FrozenStringLiteralComment
This commit is contained in:
parent
dd0a52cca9
commit
6d31dfeef4
568 changed files with 1134 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Ability
|
||||
include CanCan::Ability
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AdminAbility
|
||||
include CanCan::Ability
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Ahoy
|
||||
class Event < ApplicationRecord
|
||||
self.table_name = 'ahoy_events'
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Answer < ApplicationRecord
|
||||
has_many :qanswers
|
||||
has_many :questions, through: :qanswers
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ApplicationRecord < ActiveRecord::Base
|
||||
self.abstract_class = true
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class BoothRequest < ApplicationRecord
|
||||
belongs_to :booth
|
||||
belongs_to :user
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Campaign < ApplicationRecord
|
||||
validates :name, :utm_campaign, presence: true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# cannot delete program if there are events submitted
|
||||
|
||||
class Cfp < ApplicationRecord
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Commercial < ApplicationRecord
|
||||
require 'oembed'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module RevisionCount
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Conference < ApplicationRecord
|
||||
include RevisionCount
|
||||
require 'uri'
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Contact < ApplicationRecord
|
||||
has_paper_trail on: [:update], ignore: [:updated_at], meta: { conference_id: :conference_id }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class DifficultyLevel < ApplicationRecord
|
||||
belongs_to :program, touch: true
|
||||
has_many :events, dependent: :nullify
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class EmailSettings < ApplicationRecord
|
||||
belongs_to :conference
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Event < ApplicationRecord
|
||||
include ActiveRecord::Transitions
|
||||
include RevisionCount
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class EventSchedule < ApplicationRecord
|
||||
default_scope { where(enabled: true) }
|
||||
belongs_to :schedule
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class EventType < ApplicationRecord
|
||||
belongs_to :program, touch: true
|
||||
has_many :events, dependent: :restrict_with_error
|
||||
|
|
|
|||
|
|
@ -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]]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class EventsRegistration < ApplicationRecord
|
||||
belongs_to :registration
|
||||
belongs_to :event
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Lodging < ApplicationRecord
|
||||
belongs_to :conference
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Openid < ApplicationRecord
|
||||
belongs_to :user
|
||||
validates :provider, :uid, :email, presence: true
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Organization < ApplicationRecord
|
||||
resourcify :roles, dependent: :delete_all
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Payment < ApplicationRecord
|
||||
has_many :ticket_purchases
|
||||
belongs_to :user
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class PhysicalTicket < ApplicationRecord
|
||||
belongs_to :ticket_purchase
|
||||
has_one :ticket, through: :ticket_purchase
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# cannot delete program if there are events submitted
|
||||
|
||||
class Program < ApplicationRecord
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Qanswer < ApplicationRecord
|
||||
belongs_to :question
|
||||
belongs_to :answer, dependent: :delete
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Question < ApplicationRecord
|
||||
belongs_to :question_type
|
||||
has_and_belongs_to_many :conferences
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class QuestionType < ApplicationRecord
|
||||
has_many :questions
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Registration < ApplicationRecord
|
||||
require 'csv'
|
||||
belongs_to :user
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RegistrationPeriod < ApplicationRecord
|
||||
belongs_to :conference
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Resource < ApplicationRecord
|
||||
belongs_to :conference
|
||||
validates :name, :used, :quantity, presence: true
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Role < ApplicationRecord
|
||||
belongs_to :resource, polymorphic: true
|
||||
has_many :users_roles
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Room < ApplicationRecord
|
||||
include RevisionCount
|
||||
belongs_to :venue
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Schedule < ApplicationRecord
|
||||
belongs_to :program
|
||||
belongs_to :track
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Splashpage < ApplicationRecord
|
||||
belongs_to :conference
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Sponsor < ApplicationRecord
|
||||
belongs_to :sponsorship_level
|
||||
belongs_to :conference
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class SponsorshipLevel < ApplicationRecord
|
||||
validates :title, presence: true
|
||||
belongs_to :conference
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Subscription < ApplicationRecord
|
||||
belongs_to :conference
|
||||
belongs_to :user
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Target < ApplicationRecord
|
||||
include ActionView::Helpers::TextHelper
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Ticket < ApplicationRecord
|
||||
belongs_to :conference
|
||||
has_many :ticket_purchases, dependent: :destroy
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class TicketPurchase < ApplicationRecord
|
||||
belongs_to :ticket
|
||||
belongs_to :user
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class TicketScanning < ApplicationRecord
|
||||
belongs_to :physical_ticket
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Track < ApplicationRecord
|
||||
include ActiveRecord::Transitions
|
||||
include RevisionCount
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class IChainRecordNotFound < StandardError
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class UsersRole < ApplicationRecord
|
||||
belongs_to :role
|
||||
belongs_to :user
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Vchoice < ApplicationRecord
|
||||
belongs_to :vday
|
||||
belongs_to :vposition
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Vday < ApplicationRecord
|
||||
belongs_to :conference
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Venue < ApplicationRecord
|
||||
belongs_to :conference
|
||||
has_one :commercial, as: :commercialable, dependent: :destroy
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Visit < ApplicationRecord
|
||||
has_many :ahoy_events, class_name: 'Ahoy::Event'
|
||||
belongs_to :user
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Vote < ApplicationRecord
|
||||
belongs_to :user
|
||||
belongs_to :event
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Vposition < ApplicationRecord
|
||||
belongs_to :conference
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue