Enable frozen string literals.
Make all string literals immutable by default.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class UsersController < ApplicationController
|
||||
def edit
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ApiKeysController < ApplicationController
|
||||
before_action :requires_reauthentication
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ApplicationController < ActionController::Base
|
||||
include Pundit
|
||||
helper_method :search_params
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ArtistCommentariesController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ArtistCommentaryVersionsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ArtistUrlsController < ApplicationController
|
||||
respond_to :js, :json, :xml, :html
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ArtistVersionsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ArtistsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AutocompleteController < ApplicationController
|
||||
respond_to :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BansController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BulkUpdateRequestsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CommentVotesController < ApplicationController
|
||||
respond_to :js, :json, :xml, :html
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CommentsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :atom
|
||||
respond_to :js, only: [:new, :update, :destroy, :undelete]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CountsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DelayedJobsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DmailsController < ApplicationController
|
||||
respond_to :html, :xml, :js, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DtextLinksController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DtextPreviewsController < ApplicationController
|
||||
def create
|
||||
@inline = params[:inline].to_s.truthy?
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class EmailsController < ApplicationController
|
||||
before_action :requires_reauthentication, only: [:edit, :update]
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Explore
|
||||
class PostsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class FavoriteGroupOrdersController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class FavoriteGroupsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class FavoritesController < ApplicationController
|
||||
respond_to :js, :json, :html, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ForumPostVotesController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ForumPostsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ForumTopicVisitsController < ApplicationController
|
||||
respond_to :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ForumTopicsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
respond_to :atom, only: [:index, :show]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class IpAddressesController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class IpBansController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class IpGeolocationsController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class IqdbQueriesController < ApplicationController
|
||||
respond_to :html, :json, :xml, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class LegacyController < ApplicationController
|
||||
respond_to :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Maintenance
|
||||
module User
|
||||
class CountFixesController < ApplicationController
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Maintenance
|
||||
module User
|
||||
class DeletionsController < ApplicationController
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Maintenance
|
||||
module User
|
||||
class EmailNotificationsController < ApplicationController
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class MediaAssetsController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class MediaMetadataController < ApplicationController
|
||||
respond_to :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class MockServicesController < ApplicationController
|
||||
skip_forgery_protection
|
||||
respond_to :json
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ModActionsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ModerationReportsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Moderator
|
||||
class DashboardsController < ApplicationController
|
||||
def show
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Moderator
|
||||
class IpAddrsController < ApplicationController
|
||||
respond_to :html, :json
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Moderator
|
||||
module Post
|
||||
class PostsController < ApplicationController
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ModqueueController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
layout "sidebar"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class NewsUpdatesController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class NotePreviewsController < ApplicationController
|
||||
respond_to :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class NoteVersionsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class NotesController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PasswordResetsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PasswordsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PixivUgoiraFrameDataController < ApplicationController
|
||||
respond_to :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PoolElementsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PoolOrdersController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PoolVersionsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
before_action :check_availabililty
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PoolsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostAppealsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostApprovalsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostDisapprovalsController < ApplicationController
|
||||
respond_to :js, :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostEventsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostFlagsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostRegenerationsController < ApplicationController
|
||||
respond_to :xml, :json, :html
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostReplacementsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostVersionsController < ApplicationController
|
||||
before_action :check_availabililty
|
||||
around_action :set_timeout
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostVotesController < ApplicationController
|
||||
respond_to :js, :json, :xml, :html
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
layout "sidebar"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class RateLimitsController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class RecommendedPostsController < ApplicationController
|
||||
respond_to :html, :json, :xml, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class RelatedTagsController < ApplicationController
|
||||
respond_to :json, :xml, :js, :html
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class RobotsController < ApplicationController
|
||||
respond_to :text
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SavedSearchesController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SessionsController < ApplicationController
|
||||
respond_to :html, :json
|
||||
skip_forgery_protection only: :create, if: -> { !request.format.html? }
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SourcesController < ApplicationController
|
||||
respond_to :js, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class StaticController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class StatusController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class TagAliasesController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class TagImplicationsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class TagsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UploadsController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
skip_before_action :verify_authenticity_token, only: [:preprocess]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UserEventsController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UserFeedbacksController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UserNameChangeRequestsController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UserSessionsController < ApplicationController
|
||||
respond_to :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UserUpgradesController < ApplicationController
|
||||
respond_to :js, :html, :json, :xml
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UsersController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class WebhooksController < ApplicationController
|
||||
skip_forgery_protection only: :receive
|
||||
rescue_with Stripe::SignatureVerificationError, status: 400
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class WikiPageVersionsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
layout "sidebar"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class WikiPagesController < ApplicationController
|
||||
respond_to :html, :xml, :json, :js
|
||||
layout "sidebar"
|
||||
|
||||
Reference in New Issue
Block a user