Skip to content
Snippets Groups Projects
Commit f20a40f4 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Merge branch 'frozen-string-enable-app-models' into 'master'

Enable frozen string in app/models/*.rb

See merge request gitlab-org/gitlab-ce!20851
parents 2deb97ad 50abbd3e
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Showing
with 40 additions and 1 deletion
# frozen_string_literal: true
class SystemNoteMetadata < ActiveRecord::Base
# These notes's action text might contain a reference that is external.
# We should always force a deep validation upon references that are found
Loading
Loading
# frozen_string_literal: true
class TermAgreement < ActiveRecord::Base
belongs_to :term, class_name: 'ApplicationSetting::Term'
belongs_to :user
Loading
Loading
# frozen_string_literal: true
class Timelog < ActiveRecord::Base
validates :time_spent, :user, presence: true
validate :issuable_id_is_present
Loading
Loading
# frozen_string_literal: true
class Todo < ActiveRecord::Base
include Sortable
 
Loading
Loading
# frozen_string_literal: true
class Tree
include Gitlab::MarkupHelper
 
Loading
Loading
# frozen_string_literal: true
class TrendingProject < ActiveRecord::Base
belongs_to :project
 
Loading
Loading
# frozen_string_literal: true
# Registration information for U2F (universal 2nd factor) devices, like Yubikeys
 
class U2fRegistration < ActiveRecord::Base
Loading
Loading
# frozen_string_literal: true
class Upload < ActiveRecord::Base
# Upper limit for foreground checksum processing
CHECKSUM_THRESHOLD = 100.megabytes
Loading
Loading
# frozen_string_literal: true
require 'carrierwave/orm/activerecord'
 
class User < ActiveRecord::Base
Loading
Loading
# frozen_string_literal: true
class UserAgentDetail < ActiveRecord::Base
belongs_to :subject, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
 
Loading
Loading
# frozen_string_literal: true
class UserCallout < ActiveRecord::Base
belongs_to :user
 
Loading
Loading
# frozen_string_literal: true
class UserCustomAttribute < ActiveRecord::Base
belongs_to :user
 
Loading
Loading
# frozen_string_literal: true
class UserInteractedProject < ActiveRecord::Base
belongs_to :user
belongs_to :project
Loading
Loading
# frozen_string_literal: true
class UserSyncedAttributesMetadata < ActiveRecord::Base
belongs_to :user
 
Loading
Loading
# frozen_string_literal: true
class UsersStarProject < ActiveRecord::Base
belongs_to :project, counter_cache: :star_count, touch: true
belongs_to :user
Loading
Loading
# frozen_string_literal: true
class WikiDirectory
include ActiveModel::Validations
 
Loading
Loading
# frozen_string_literal: true
# rubocop:disable Rails/ActiveRecordAliases
class WikiPage
PageChangedError = Class.new(StandardError)
Loading
Loading
---
title: Enable frozen string in app/models/*.rb
merge_request: 20851
author: gfyoung
type: performance
Loading
Loading
@@ -13,7 +13,7 @@ describe Admin::ServicesController do
Service.available_services_names.each do |service_name|
context "#{service_name}" do
let!(:service) do
service_template = service_name.concat("_service").camelize.constantize
service_template = "#{service_name}_service".camelize.constantize
service_template.where(template: true).first_or_create
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment