зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-06 19:55:50 +03:00
Add specs configuration
Этот коммит содержится в:
335
spec/dummy/config/initializers/active_admin.rb
Обычный файл
335
spec/dummy/config/initializers/active_admin.rb
Обычный файл
@@ -0,0 +1,335 @@
|
||||
ActiveAdmin.setup do |config|
|
||||
# == Site Title
|
||||
#
|
||||
# Set the title that is displayed on the main layout
|
||||
# for each of the active admin pages.
|
||||
#
|
||||
config.site_title = "Dummy"
|
||||
|
||||
# Set the link url for the title. For example, to take
|
||||
# users to your main site. Defaults to no link.
|
||||
#
|
||||
# config.site_title_link = "/"
|
||||
|
||||
# Set an optional image to be displayed for the header
|
||||
# instead of a string (overrides :site_title)
|
||||
#
|
||||
# Note: Aim for an image that's 21px high so it fits in the header.
|
||||
#
|
||||
# config.site_title_image = "logo.png"
|
||||
|
||||
# == Default Namespace
|
||||
#
|
||||
# Set the default namespace each administration resource
|
||||
# will be added to.
|
||||
#
|
||||
# eg:
|
||||
# config.default_namespace = :hello_world
|
||||
#
|
||||
# This will create resources in the HelloWorld module and
|
||||
# will namespace routes to /hello_world/*
|
||||
#
|
||||
# To set no namespace by default, use:
|
||||
# config.default_namespace = false
|
||||
#
|
||||
# Default:
|
||||
# config.default_namespace = :admin
|
||||
#
|
||||
# You can customize the settings for each namespace by using
|
||||
# a namespace block. For example, to change the site title
|
||||
# within a namespace:
|
||||
#
|
||||
# config.namespace :admin do |admin|
|
||||
# admin.site_title = "Custom Admin Title"
|
||||
# end
|
||||
#
|
||||
# This will ONLY change the title for the admin section. Other
|
||||
# namespaces will continue to use the main "site_title" configuration.
|
||||
|
||||
# == User Authentication
|
||||
#
|
||||
# Active Admin will automatically call an authentication
|
||||
# method in a before filter of all controller actions to
|
||||
# ensure that there is a currently logged in admin user.
|
||||
#
|
||||
# This setting changes the method which Active Admin calls
|
||||
# within the application controller.
|
||||
# config.authentication_method = :authenticate_admin_user!
|
||||
|
||||
# == User Authorization
|
||||
#
|
||||
# Active Admin will automatically call an authorization
|
||||
# method in a before filter of all controller actions to
|
||||
# ensure that there is a user with proper rights. You can use
|
||||
# CanCanAdapter or make your own. Please refer to documentation.
|
||||
# config.authorization_adapter = ActiveAdmin::CanCanAdapter
|
||||
|
||||
# In case you prefer Pundit over other solutions you can here pass
|
||||
# the name of default policy class. This policy will be used in every
|
||||
# case when Pundit is unable to find suitable policy.
|
||||
# config.pundit_default_policy = "MyDefaultPunditPolicy"
|
||||
|
||||
# If you wish to maintain a separate set of Pundit policies for admin
|
||||
# resources, you may set a namespace here that Pundit will search
|
||||
# within when looking for a resource's policy.
|
||||
# config.pundit_policy_namespace = :admin
|
||||
|
||||
# You can customize your CanCan Ability class name here.
|
||||
# config.cancan_ability_class = "Ability"
|
||||
|
||||
# You can specify a method to be called on unauthorized access.
|
||||
# This is necessary in order to prevent a redirect loop which happens
|
||||
# because, by default, user gets redirected to Dashboard. If user
|
||||
# doesn't have access to Dashboard, he'll end up in a redirect loop.
|
||||
# Method provided here should be defined in application_controller.rb.
|
||||
# config.on_unauthorized_access = :access_denied
|
||||
|
||||
# == Current User
|
||||
#
|
||||
# Active Admin will associate actions with the current
|
||||
# user performing them.
|
||||
#
|
||||
# This setting changes the method which Active Admin calls
|
||||
# (within the application controller) to return the currently logged in user.
|
||||
# config.current_user_method = :current_admin_user
|
||||
|
||||
# == Logging Out
|
||||
#
|
||||
# Active Admin displays a logout link on each screen. These
|
||||
# settings configure the location and method used for the link.
|
||||
#
|
||||
# This setting changes the path where the link points to. If it's
|
||||
# a string, the strings is used as the path. If it's a Symbol, we
|
||||
# will call the method to return the path.
|
||||
#
|
||||
# Default:
|
||||
config.logout_link_path = :destroy_admin_user_session_path
|
||||
|
||||
# This setting changes the http method used when rendering the
|
||||
# link. For example :get, :delete, :put, etc..
|
||||
#
|
||||
# Default:
|
||||
# config.logout_link_method = :get
|
||||
|
||||
# == Root
|
||||
#
|
||||
# Set the action to call for the root path. You can set different
|
||||
# roots for each namespace.
|
||||
#
|
||||
# Default:
|
||||
# config.root_to = 'dashboard#index'
|
||||
|
||||
# == Admin Comments
|
||||
#
|
||||
# This allows your users to comment on any resource registered with Active Admin.
|
||||
#
|
||||
# You can completely disable comments:
|
||||
# config.comments = false
|
||||
#
|
||||
# You can change the name under which comments are registered:
|
||||
# config.comments_registration_name = 'AdminComment'
|
||||
#
|
||||
# You can change the order for the comments and you can change the column
|
||||
# to be used for ordering:
|
||||
# config.comments_order = 'created_at ASC'
|
||||
#
|
||||
# You can disable the menu item for the comments index page:
|
||||
# config.comments_menu = false
|
||||
#
|
||||
# You can customize the comment menu:
|
||||
# config.comments_menu = { parent: 'Admin', priority: 1 }
|
||||
|
||||
# == Batch Actions
|
||||
#
|
||||
# Enable and disable Batch Actions
|
||||
#
|
||||
config.batch_actions = true
|
||||
|
||||
# == Controller Filters
|
||||
#
|
||||
# You can add before, after and around filters to all of your
|
||||
# Active Admin resources and pages from here.
|
||||
#
|
||||
# config.before_action :do_something_awesome
|
||||
|
||||
# == Attribute Filters
|
||||
#
|
||||
# You can exclude possibly sensitive model attributes from being displayed,
|
||||
# added to forms, or exported by default by ActiveAdmin
|
||||
#
|
||||
config.filter_attributes = [:encrypted_password, :password, :password_confirmation]
|
||||
|
||||
# == Localize Date/Time Format
|
||||
#
|
||||
# Set the localize format to display dates and times.
|
||||
# To understand how to localize your app with I18n, read more at
|
||||
# https://guides.rubyonrails.org/i18n.html
|
||||
#
|
||||
# You can run `bin/rails runner 'puts I18n.t("date.formats")'` to see the
|
||||
# available formats in your application.
|
||||
#
|
||||
config.localize_format = :long
|
||||
|
||||
# == Setting a Favicon
|
||||
#
|
||||
# config.favicon = 'favicon.ico'
|
||||
|
||||
# == Meta Tags
|
||||
#
|
||||
# Add additional meta tags to the head element of active admin pages.
|
||||
#
|
||||
# Add tags to all pages logged in users see:
|
||||
# config.meta_tags = { author: 'My Company' }
|
||||
|
||||
# By default, sign up/sign in/recover password pages are excluded
|
||||
# from showing up in search engine results by adding a robots meta
|
||||
# tag. You can reset the hash of meta tags included in logged out
|
||||
# pages:
|
||||
# config.meta_tags_for_logged_out_pages = {}
|
||||
|
||||
# == Removing Breadcrumbs
|
||||
#
|
||||
# Breadcrumbs are enabled by default. You can customize them for individual
|
||||
# resources or you can disable them globally from here.
|
||||
#
|
||||
# config.breadcrumb = false
|
||||
|
||||
# == Create Another Checkbox
|
||||
#
|
||||
# Create another checkbox is disabled by default. You can customize it for individual
|
||||
# resources or you can enable them globally from here.
|
||||
#
|
||||
# config.create_another = true
|
||||
|
||||
# == Register Stylesheets & Javascripts
|
||||
#
|
||||
# We recommend using the built in Active Admin layout and loading
|
||||
# up your own stylesheets / javascripts to customize the look
|
||||
# and feel.
|
||||
#
|
||||
# To load a stylesheet:
|
||||
# config.register_stylesheet 'my_stylesheet.css'
|
||||
#
|
||||
# You can provide an options hash for more control, which is passed along to stylesheet_link_tag():
|
||||
# config.register_stylesheet 'my_print_stylesheet.css', media: :print
|
||||
#
|
||||
# To load a javascript file:
|
||||
# config.register_javascript 'my_javascript.js'
|
||||
|
||||
# == CSV options
|
||||
#
|
||||
# Set the CSV builder separator
|
||||
# config.csv_options = { col_sep: ';' }
|
||||
#
|
||||
# Force the use of quotes
|
||||
# config.csv_options = { force_quotes: true }
|
||||
|
||||
# == Menu System
|
||||
#
|
||||
# You can add a navigation menu to be used in your application, or configure a provided menu
|
||||
#
|
||||
# To change the default utility navigation to show a link to your website & a logout btn
|
||||
#
|
||||
# config.namespace :admin do |admin|
|
||||
# admin.build_menu :utility_navigation do |menu|
|
||||
# menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
|
||||
# admin.add_logout_button_to_menu menu
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# If you wanted to add a static menu item to the default menu provided:
|
||||
#
|
||||
# config.namespace :admin do |admin|
|
||||
# admin.build_menu :default do |menu|
|
||||
# menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
|
||||
# end
|
||||
# end
|
||||
|
||||
# == Download Links
|
||||
#
|
||||
# You can disable download links on resource listing pages,
|
||||
# or customize the formats shown per namespace/globally
|
||||
#
|
||||
# To disable/customize for the :admin namespace:
|
||||
#
|
||||
# config.namespace :admin do |admin|
|
||||
#
|
||||
# # Disable the links entirely
|
||||
# admin.download_links = false
|
||||
#
|
||||
# # Only show XML & PDF options
|
||||
# admin.download_links = [:xml, :pdf]
|
||||
#
|
||||
# # Enable/disable the links based on block
|
||||
# # (for example, with cancan)
|
||||
# admin.download_links = proc { can?(:view_download_links) }
|
||||
#
|
||||
# end
|
||||
|
||||
# == Pagination
|
||||
#
|
||||
# Pagination is enabled by default for all resources.
|
||||
# You can control the default per page count for all resources here.
|
||||
#
|
||||
# config.default_per_page = 30
|
||||
#
|
||||
# You can control the max per page count too.
|
||||
#
|
||||
# config.max_per_page = 10_000
|
||||
|
||||
# == Filters
|
||||
#
|
||||
# By default the index screen includes a "Filters" sidebar on the right
|
||||
# hand side with a filter for each attribute of the registered model.
|
||||
# You can enable or disable them for all resources here.
|
||||
#
|
||||
# config.filters = true
|
||||
#
|
||||
# By default the filters include associations in a select, which means
|
||||
# that every record will be loaded for each association (up
|
||||
# to the value of config.maximum_association_filter_arity).
|
||||
# You can enabled or disable the inclusion
|
||||
# of those filters by default here.
|
||||
#
|
||||
# config.include_default_association_filters = true
|
||||
|
||||
# config.maximum_association_filter_arity = 256 # default value of :unlimited will change to 256 in a future version
|
||||
# config.filter_columns_for_large_association, [
|
||||
# :display_name,
|
||||
# :full_name,
|
||||
# :name,
|
||||
# :username,
|
||||
# :login,
|
||||
# :title,
|
||||
# :email,
|
||||
# ]
|
||||
# config.filter_method_for_large_association, '_starts_with'
|
||||
|
||||
# == Head
|
||||
#
|
||||
# You can add your own content to the site head like analytics. Make sure
|
||||
# you only pass content you trust.
|
||||
#
|
||||
# config.head = ''.html_safe
|
||||
|
||||
# == Footer
|
||||
#
|
||||
# By default, the footer shows the current Active Admin version. You can
|
||||
# override the content of the footer here.
|
||||
#
|
||||
# config.footer = 'my custom footer text'
|
||||
|
||||
# == Sorting
|
||||
#
|
||||
# By default ActiveAdmin::OrderClause is used for sorting logic
|
||||
# You can inherit it with own class and inject it for all resources
|
||||
#
|
||||
# config.order_clause = MyOrderClause
|
||||
|
||||
# == Webpacker
|
||||
#
|
||||
# By default, Active Admin uses Sprocket's asset pipeline.
|
||||
# You can switch to using Webpacker here.
|
||||
#
|
||||
# config.use_webpacker = true
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# ActiveSupport::Reloader.to_prepare do
|
||||
# ApplicationController.renderer.defaults.merge!(
|
||||
# http_host: 'example.org',
|
||||
# https: false
|
||||
# )
|
||||
# end
|
||||
12
spec/dummy/config/initializers/assets.rb
Обычный файл
12
spec/dummy/config/initializers/assets.rb
Обычный файл
@@ -0,0 +1,12 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Version of your assets, change this if you want to expire all your assets.
|
||||
Rails.application.config.assets.version = '1.0'
|
||||
|
||||
# Add additional assets to the asset load path.
|
||||
# Rails.application.config.assets.paths << Emoji.images_path
|
||||
|
||||
# Precompile additional assets.
|
||||
# application.js, application.css, and all non-JS/CSS in the app/assets
|
||||
# folder are already added.
|
||||
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
|
||||
7
spec/dummy/config/initializers/backtrace_silencers.rb
Обычный файл
7
spec/dummy/config/initializers/backtrace_silencers.rb
Обычный файл
@@ -0,0 +1,7 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
||||
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
||||
|
||||
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
||||
# Rails.backtrace_cleaner.remove_silencers!
|
||||
28
spec/dummy/config/initializers/content_security_policy.rb
Обычный файл
28
spec/dummy/config/initializers/content_security_policy.rb
Обычный файл
@@ -0,0 +1,28 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Define an application-wide content security policy
|
||||
# For further information see the following documentation
|
||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
|
||||
|
||||
# Rails.application.config.content_security_policy do |policy|
|
||||
# policy.default_src :self, :https
|
||||
# policy.font_src :self, :https, :data
|
||||
# policy.img_src :self, :https, :data
|
||||
# policy.object_src :none
|
||||
# policy.script_src :self, :https
|
||||
# policy.style_src :self, :https
|
||||
|
||||
# # Specify URI for violation reports
|
||||
# # policy.report_uri "/csp-violation-report-endpoint"
|
||||
# end
|
||||
|
||||
# If you are using UJS then enable automatic nonce generation
|
||||
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
||||
|
||||
# Set the nonce only to specific directives
|
||||
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
||||
|
||||
# Report CSP violations to a specified URI
|
||||
# For further information see the following documentation:
|
||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
||||
# Rails.application.config.content_security_policy_report_only = true
|
||||
5
spec/dummy/config/initializers/cookies_serializer.rb
Обычный файл
5
spec/dummy/config/initializers/cookies_serializer.rb
Обычный файл
@@ -0,0 +1,5 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Specify a serializer for the signed and encrypted cookie jars.
|
||||
# Valid options are :json, :marshal, and :hybrid.
|
||||
Rails.application.config.action_dispatch.cookies_serializer = :json
|
||||
4
spec/dummy/config/initializers/filter_parameter_logging.rb
Обычный файл
4
spec/dummy/config/initializers/filter_parameter_logging.rb
Обычный файл
@@ -0,0 +1,4 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Configure sensitive parameters which will be filtered from the log file.
|
||||
Rails.application.config.filter_parameters += [:password]
|
||||
16
spec/dummy/config/initializers/inflections.rb
Обычный файл
16
spec/dummy/config/initializers/inflections.rb
Обычный файл
@@ -0,0 +1,16 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new inflection rules using the following format. Inflections
|
||||
# are locale specific, and you may define rules for as many different
|
||||
# locales as you wish. All of these examples are active by default:
|
||||
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person', 'people'
|
||||
# inflect.uncountable %w( fish sheep )
|
||||
# end
|
||||
|
||||
# These inflection rules are supported but not enabled by default:
|
||||
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
# inflect.acronym 'RESTful'
|
||||
# end
|
||||
4
spec/dummy/config/initializers/mime_types.rb
Обычный файл
4
spec/dummy/config/initializers/mime_types.rb
Обычный файл
@@ -0,0 +1,4 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
# Mime::Type.register "text/richtext", :rtf
|
||||
14
spec/dummy/config/initializers/wrap_parameters.rb
Обычный файл
14
spec/dummy/config/initializers/wrap_parameters.rb
Обычный файл
@@ -0,0 +1,14 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# This file contains settings for ActionController::ParamsWrapper which
|
||||
# is enabled by default.
|
||||
|
||||
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
||||
ActiveSupport.on_load(:action_controller) do
|
||||
wrap_parameters format: [:json]
|
||||
end
|
||||
|
||||
# To enable root element in JSON for ActiveRecord objects.
|
||||
# ActiveSupport.on_load(:active_record) do
|
||||
# self.include_root_in_json = true
|
||||
# end
|
||||
Ссылка в новой задаче
Block a user