Skip to content

Commit

Permalink
Merge pull request rails#44448 from p8/docs/add-documentation-to-appl…
Browse files Browse the repository at this point in the history
…ication-configuration

Document some methods in Application::Configuration [ci-skip]
  • Loading branch information
jonathanhefner committed Feb 16, 2022
2 parents d9edce6 + 7c7d0b5 commit b744f2f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions railties/lib/rails/application/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,20 @@ def colorize_logging=(val)
generators.colorize_logging = val
end

# Specifies what class to use to store the session. Possible values
# are `:cookie_store`, `:mem_cache_store`, a custom store, or
# `:disabled`. `:disabled` tells Rails not to deal with sessions.
#
# Additional options will be set as +session_options+:
#
# config.session_store :cookie_store, key: "_your_app_session"
# config.session_options # => {key: "_your_app_session"}
#
# If a custom store is specified as a symbol, it will be resolved to
# the +ActionDispatch::Session+ namespace:
#
# # use ActionDispatch::Session::MyCustomStore as the session store
# config.session_store :my_custom_store
def session_store(new_session_store = nil, **options)
if new_session_store
if new_session_store == :active_record_store
Expand Down Expand Up @@ -409,6 +423,7 @@ def annotations
Rails::SourceAnnotationExtractor::Annotation
end

# Configures the ActionDispatch::ContentSecurityPolicy.
def content_security_policy(&block)
if block_given?
@content_security_policy = ActionDispatch::ContentSecurityPolicy.new(&block)
Expand All @@ -417,6 +432,7 @@ def content_security_policy(&block)
end
end

# Configures the ActionDispatch::PermissionsPolicy.
def permissions_policy(&block)
if block_given?
@permissions_policy = ActionDispatch::PermissionsPolicy.new(&block)
Expand Down

0 comments on commit b744f2f

Please sign in to comment.