Enable frozen string literals.
Make all string literals immutable by default.
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ApplicationComponent < ViewComponent::Base
|
class ApplicationComponent < ViewComponent::Base
|
||||||
delegate :link_to_user, :time_ago_in_words_tagged, :format_text, :external_link_to, :tag_class, to: :helpers
|
delegate :link_to_user, :time_ago_in_words_tagged, :format_text, :external_link_to, :tag_class, to: :helpers
|
||||||
delegate :edit_icon, :delete_icon, :undelete_icon, :flag_icon, :upvote_icon, :downvote_icon, :link_icon, :sticky_icon, :unsticky_icon, to: :helpers
|
delegate :edit_icon, :delete_icon, :undelete_icon, :flag_icon, :upvote_icon, :downvote_icon, :link_icon, :sticky_icon, :unsticky_icon, to: :helpers
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This component represents the tooltip that displays when you hover over a comment's score.
|
# This component represents the tooltip that displays when you hover over a comment's score.
|
||||||
class CommentVotesTooltipComponent < ApplicationComponent
|
class CommentVotesTooltipComponent < ApplicationComponent
|
||||||
attr_reader :comment, :current_user
|
attr_reader :comment, :current_user
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
#
|
||||||
# A component that displays a gallery of post thumbnails.
|
# A component that displays a gallery of post thumbnails.
|
||||||
#
|
#
|
||||||
# There are two types of galleries:
|
# There are two types of galleries:
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostNavbarComponent < ApplicationComponent
|
class PostNavbarComponent < ApplicationComponent
|
||||||
extend Memoist
|
extend Memoist
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Admin
|
module Admin
|
||||||
class UsersController < ApplicationController
|
class UsersController < ApplicationController
|
||||||
def edit
|
def edit
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ApiKeysController < ApplicationController
|
class ApiKeysController < ApplicationController
|
||||||
before_action :requires_reauthentication
|
before_action :requires_reauthentication
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
include Pundit
|
include Pundit
|
||||||
helper_method :search_params
|
helper_method :search_params
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ArtistCommentariesController < ApplicationController
|
class ArtistCommentariesController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ArtistCommentaryVersionsController < ApplicationController
|
class ArtistCommentaryVersionsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ArtistUrlsController < ApplicationController
|
class ArtistUrlsController < ApplicationController
|
||||||
respond_to :js, :json, :xml, :html
|
respond_to :js, :json, :xml, :html
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ArtistVersionsController < ApplicationController
|
class ArtistVersionsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ArtistsController < ApplicationController
|
class ArtistsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AutocompleteController < ApplicationController
|
class AutocompleteController < ApplicationController
|
||||||
respond_to :xml, :json
|
respond_to :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class BansController < ApplicationController
|
class BansController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class BulkUpdateRequestsController < ApplicationController
|
class BulkUpdateRequestsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class CommentVotesController < ApplicationController
|
class CommentVotesController < ApplicationController
|
||||||
respond_to :js, :json, :xml, :html
|
respond_to :js, :json, :xml, :html
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class CommentsController < ApplicationController
|
class CommentsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :atom
|
respond_to :html, :xml, :json, :atom
|
||||||
respond_to :js, only: [:new, :update, :destroy, :undelete]
|
respond_to :js, only: [:new, :update, :destroy, :undelete]
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class CountsController < ApplicationController
|
class CountsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class DelayedJobsController < ApplicationController
|
class DelayedJobsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class DmailsController < ApplicationController
|
class DmailsController < ApplicationController
|
||||||
respond_to :html, :xml, :js, :json
|
respond_to :html, :xml, :js, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class DtextLinksController < ApplicationController
|
class DtextLinksController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class DtextPreviewsController < ApplicationController
|
class DtextPreviewsController < ApplicationController
|
||||||
def create
|
def create
|
||||||
@inline = params[:inline].to_s.truthy?
|
@inline = params[:inline].to_s.truthy?
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class EmailsController < ApplicationController
|
class EmailsController < ApplicationController
|
||||||
before_action :requires_reauthentication, only: [:edit, :update]
|
before_action :requires_reauthentication, only: [:edit, :update]
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Explore
|
module Explore
|
||||||
class PostsController < ApplicationController
|
class PostsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class FavoriteGroupOrdersController < ApplicationController
|
class FavoriteGroupOrdersController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class FavoriteGroupsController < ApplicationController
|
class FavoriteGroupsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class FavoritesController < ApplicationController
|
class FavoritesController < ApplicationController
|
||||||
respond_to :js, :json, :html, :xml
|
respond_to :js, :json, :html, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ForumPostVotesController < ApplicationController
|
class ForumPostVotesController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ForumPostsController < ApplicationController
|
class ForumPostsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ForumTopicVisitsController < ApplicationController
|
class ForumTopicVisitsController < ApplicationController
|
||||||
respond_to :xml, :json
|
respond_to :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ForumTopicsController < ApplicationController
|
class ForumTopicsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
respond_to :atom, only: [:index, :show]
|
respond_to :atom, only: [:index, :show]
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class IpAddressesController < ApplicationController
|
class IpAddressesController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class IpBansController < ApplicationController
|
class IpBansController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class IpGeolocationsController < ApplicationController
|
class IpGeolocationsController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class IqdbQueriesController < ApplicationController
|
class IqdbQueriesController < ApplicationController
|
||||||
respond_to :html, :json, :xml, :js
|
respond_to :html, :json, :xml, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class LegacyController < ApplicationController
|
class LegacyController < ApplicationController
|
||||||
respond_to :json, :xml
|
respond_to :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Maintenance
|
module Maintenance
|
||||||
module User
|
module User
|
||||||
class CountFixesController < ApplicationController
|
class CountFixesController < ApplicationController
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Maintenance
|
module Maintenance
|
||||||
module User
|
module User
|
||||||
class DeletionsController < ApplicationController
|
class DeletionsController < ApplicationController
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Maintenance
|
module Maintenance
|
||||||
module User
|
module User
|
||||||
class EmailNotificationsController < ApplicationController
|
class EmailNotificationsController < ApplicationController
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class MediaAssetsController < ApplicationController
|
class MediaAssetsController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class MediaMetadataController < ApplicationController
|
class MediaMetadataController < ApplicationController
|
||||||
respond_to :json, :xml
|
respond_to :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class MockServicesController < ApplicationController
|
class MockServicesController < ApplicationController
|
||||||
skip_forgery_protection
|
skip_forgery_protection
|
||||||
respond_to :json
|
respond_to :json
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ModActionsController < ApplicationController
|
class ModActionsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ModerationReportsController < ApplicationController
|
class ModerationReportsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Moderator
|
module Moderator
|
||||||
class DashboardsController < ApplicationController
|
class DashboardsController < ApplicationController
|
||||||
def show
|
def show
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Moderator
|
module Moderator
|
||||||
class IpAddrsController < ApplicationController
|
class IpAddrsController < ApplicationController
|
||||||
respond_to :html, :json
|
respond_to :html, :json
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Moderator
|
module Moderator
|
||||||
module Post
|
module Post
|
||||||
class PostsController < ApplicationController
|
class PostsController < ApplicationController
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ModqueueController < ApplicationController
|
class ModqueueController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
layout "sidebar"
|
layout "sidebar"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class NewsUpdatesController < ApplicationController
|
class NewsUpdatesController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class NotePreviewsController < ApplicationController
|
class NotePreviewsController < ApplicationController
|
||||||
respond_to :json
|
respond_to :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class NoteVersionsController < ApplicationController
|
class NoteVersionsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class NotesController < ApplicationController
|
class NotesController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PasswordResetsController < ApplicationController
|
class PasswordResetsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PasswordsController < ApplicationController
|
class PasswordsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PixivUgoiraFrameDataController < ApplicationController
|
class PixivUgoiraFrameDataController < ApplicationController
|
||||||
respond_to :json, :xml
|
respond_to :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PoolElementsController < ApplicationController
|
class PoolElementsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PoolOrdersController < ApplicationController
|
class PoolOrdersController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PoolVersionsController < ApplicationController
|
class PoolVersionsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
before_action :check_availabililty
|
before_action :check_availabililty
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PoolsController < ApplicationController
|
class PoolsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostAppealsController < ApplicationController
|
class PostAppealsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostApprovalsController < ApplicationController
|
class PostApprovalsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostDisapprovalsController < ApplicationController
|
class PostDisapprovalsController < ApplicationController
|
||||||
respond_to :js, :html, :json, :xml
|
respond_to :js, :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostEventsController < ApplicationController
|
class PostEventsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostFlagsController < ApplicationController
|
class PostFlagsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostRegenerationsController < ApplicationController
|
class PostRegenerationsController < ApplicationController
|
||||||
respond_to :xml, :json, :html
|
respond_to :xml, :json, :html
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostReplacementsController < ApplicationController
|
class PostReplacementsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostVersionsController < ApplicationController
|
class PostVersionsController < ApplicationController
|
||||||
before_action :check_availabililty
|
before_action :check_availabililty
|
||||||
around_action :set_timeout
|
around_action :set_timeout
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostVotesController < ApplicationController
|
class PostVotesController < ApplicationController
|
||||||
respond_to :js, :json, :xml, :html
|
respond_to :js, :json, :xml, :html
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class PostsController < ApplicationController
|
class PostsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
layout "sidebar"
|
layout "sidebar"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class RateLimitsController < ApplicationController
|
class RateLimitsController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class RecommendedPostsController < ApplicationController
|
class RecommendedPostsController < ApplicationController
|
||||||
respond_to :html, :json, :xml, :js
|
respond_to :html, :json, :xml, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class RelatedTagsController < ApplicationController
|
class RelatedTagsController < ApplicationController
|
||||||
respond_to :json, :xml, :js, :html
|
respond_to :json, :xml, :js, :html
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class RobotsController < ApplicationController
|
class RobotsController < ApplicationController
|
||||||
respond_to :text
|
respond_to :text
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class SavedSearchesController < ApplicationController
|
class SavedSearchesController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class SessionsController < ApplicationController
|
class SessionsController < ApplicationController
|
||||||
respond_to :html, :json
|
respond_to :html, :json
|
||||||
skip_forgery_protection only: :create, if: -> { !request.format.html? }
|
skip_forgery_protection only: :create, if: -> { !request.format.html? }
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class SourcesController < ApplicationController
|
class SourcesController < ApplicationController
|
||||||
respond_to :js, :json, :xml
|
respond_to :js, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class StaticController < ApplicationController
|
class StaticController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class StatusController < ApplicationController
|
class StatusController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class TagAliasesController < ApplicationController
|
class TagAliasesController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class TagImplicationsController < ApplicationController
|
class TagImplicationsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class TagsController < ApplicationController
|
class TagsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class UploadsController < ApplicationController
|
class UploadsController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
skip_before_action :verify_authenticity_token, only: [:preprocess]
|
skip_before_action :verify_authenticity_token, only: [:preprocess]
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class UserEventsController < ApplicationController
|
class UserEventsController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class UserFeedbacksController < ApplicationController
|
class UserFeedbacksController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class UserNameChangeRequestsController < ApplicationController
|
class UserNameChangeRequestsController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class UserSessionsController < ApplicationController
|
class UserSessionsController < ApplicationController
|
||||||
respond_to :html, :json, :xml
|
respond_to :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class UserUpgradesController < ApplicationController
|
class UserUpgradesController < ApplicationController
|
||||||
respond_to :js, :html, :json, :xml
|
respond_to :js, :html, :json, :xml
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class UsersController < ApplicationController
|
class UsersController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class WebhooksController < ApplicationController
|
class WebhooksController < ApplicationController
|
||||||
skip_forgery_protection only: :receive
|
skip_forgery_protection only: :receive
|
||||||
rescue_with Stripe::SignatureVerificationError, status: 400
|
rescue_with Stripe::SignatureVerificationError, status: 400
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class WikiPageVersionsController < ApplicationController
|
class WikiPageVersionsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
layout "sidebar"
|
layout "sidebar"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class WikiPagesController < ApplicationController
|
class WikiPagesController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
layout "sidebar"
|
layout "sidebar"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
def listing_type(*fields, member_check: true, types: [:revert, :standard])
|
def listing_type(*fields, member_check: true, types: [:revert, :standard])
|
||||||
(fields.reduce(false) { |acc, field| acc || params.dig(:search, field).present? } && (!member_check || CurrentUser.is_member?) ? types[0] : types[1])
|
(fields.reduce(false) { |acc, field| acc || params.dig(:search, field).present? } && (!member_check || CurrentUser.is_member?) ? types[0] : types[1])
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ArtistCommentariesHelper
|
module ArtistCommentariesHelper
|
||||||
def format_commentary_title(title, classes: "")
|
def format_commentary_title(title, classes: "")
|
||||||
tag.h3 do
|
tag.h3 do
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ArtistCommentaryVersionsHelper
|
module ArtistCommentaryVersionsHelper
|
||||||
def commentary_version_field_diff(commentary_version, type, field)
|
def commentary_version_field_diff(commentary_version, type, field)
|
||||||
other = commentary_version.send(params[:type])
|
other = commentary_version.send(params[:type])
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ArtistVersionsHelper
|
module ArtistVersionsHelper
|
||||||
def artist_version_other_names_diff(artist_version, type)
|
def artist_version_other_names_diff(artist_version, type)
|
||||||
other = artist_version.send(type)
|
other = artist_version.send(type)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ComponentsHelper
|
module ComponentsHelper
|
||||||
def post_preview(post, fit: :fixed, **options)
|
def post_preview(post, fit: :fixed, **options)
|
||||||
render PostPreviewComponent.new(post: post, fit: fit, **options)
|
render PostPreviewComponent.new(post: post, fit: fit, **options)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module DelayedJobsHelper
|
module DelayedJobsHelper
|
||||||
def print_name(job)
|
def print_name(job)
|
||||||
case job.name
|
case job.name
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ForumTopicsHelper
|
module ForumTopicsHelper
|
||||||
def forum_topic_category_select(object, field)
|
def forum_topic_category_select(object, field)
|
||||||
select(object, field, ForumTopic.reverse_category_mapping.to_a)
|
select(object, field, ForumTopic.reverse_category_mapping.to_a)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module IconHelper
|
module IconHelper
|
||||||
def icon_tag(icon_class, class: nil, **options)
|
def icon_tag(icon_class, class: nil, **options)
|
||||||
klass = binding.local_variable_get(:class)
|
klass = binding.local_variable_get(:class)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module IpAddressesHelper
|
module IpAddressesHelper
|
||||||
# https://www.bing.com/maps/embed-a-map
|
# https://www.bing.com/maps/embed-a-map
|
||||||
# https://docs.microsoft.com/en-us/bingmaps/articles/create-a-custom-map-url
|
# https://docs.microsoft.com/en-us/bingmaps/articles/create-a-custom-map-url
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user