# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `actionview` gem.
# Please instead update this file by running `bin/tapioca gem actionview`.
class ActionController::Base < ::ActionController::Metal
include ::ActionDispatch::Routing::PolymorphicRoutes
include ::ActionController::Head
include ::AbstractController::Caching::ConfigMethods
include ::ActionController::BasicImplicitRender
extend ::AbstractController::Helpers::Resolution
# source://activesupport/8.0.1/lib/active_support/callbacks.rb#69
def __callbacks; end
# source://actionpack/8.0.1/lib/abstract_controller/helpers.rb#13
def _helper_methods; end
# source://actionpack/8.0.1/lib/abstract_controller/helpers.rb#13
def _helper_methods=(_arg0); end
# source://actionpack/8.0.1/lib/abstract_controller/helpers.rb#13
def _helper_methods?; end
# source://actionview//lib/action_view/layouts.rb#212
def _layout_conditions; end
# source://actionview//lib/action_view/layouts.rb#212
def _layout_conditions?; end
# source://activesupport/8.0.1/lib/active_support/callbacks.rb#923
def _process_action_callbacks; end
# source://actionpack/8.0.1/lib/action_controller/metal/renderers.rb#31
def _renderers; end
# source://actionpack/8.0.1/lib/action_controller/metal/renderers.rb#31
def _renderers=(_arg0); end
# source://actionpack/8.0.1/lib/action_controller/metal/renderers.rb#31
def _renderers?; end
# source://activesupport/8.0.1/lib/active_support/callbacks.rb#911
def _run_process_action_callbacks(&block); end
# source://actionpack/8.0.1/lib/abstract_controller/caching.rb#44
def _view_cache_dependencies; end
# source://actionpack/8.0.1/lib/abstract_controller/caching.rb#44
def _view_cache_dependencies=(_arg0); end
# source://actionpack/8.0.1/lib/abstract_controller/caching.rb#44
def _view_cache_dependencies?; end
# source://actionpack/8.0.1/lib/action_controller/metal/params_wrapper.rb#185
def _wrapper_options; end
# source://actionpack/8.0.1/lib/action_controller/metal/params_wrapper.rb#185
def _wrapper_options=(_arg0); end
# source://actionpack/8.0.1/lib/action_controller/metal/params_wrapper.rb#185
def _wrapper_options?; end
# source://actionpack/8.0.1/lib/action_controller/metal/flash.rb#38
def alert; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def allow_forgery_protection; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def allow_forgery_protection=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def asset_host; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def asset_host=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def assets_dir; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def assets_dir=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def csrf_token_storage_strategy; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def csrf_token_storage_strategy=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def default_asset_host_protocol; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def default_asset_host_protocol=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def default_static_extension; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def default_static_extension=(value); end
# source://actionpack/8.0.1/lib/action_dispatch/routing/url_for.rb#100
def default_url_options; end
# source://actionpack/8.0.1/lib/action_dispatch/routing/url_for.rb#100
def default_url_options=(_arg0); end
# source://actionpack/8.0.1/lib/action_dispatch/routing/url_for.rb#100
def default_url_options?; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def enable_fragment_cache_logging; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def enable_fragment_cache_logging=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/etag_with_template_digest.rb#31
def etag_with_template_digest; end
# source://actionpack/8.0.1/lib/action_controller/metal/etag_with_template_digest.rb#31
def etag_with_template_digest=(_arg0); end
# source://actionpack/8.0.1/lib/action_controller/metal/etag_with_template_digest.rb#31
def etag_with_template_digest?; end
# source://actionpack/8.0.1/lib/action_controller/metal/conditional_get.rb#15
def etaggers; end
# source://actionpack/8.0.1/lib/action_controller/metal/conditional_get.rb#15
def etaggers=(_arg0); end
# source://actionpack/8.0.1/lib/action_controller/metal/conditional_get.rb#15
def etaggers?; end
# source://actionpack/8.0.1/lib/action_controller/metal/flash.rb#12
def flash(*_arg0, **_arg1, &_arg2); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def forgery_protection_origin_check; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def forgery_protection_origin_check=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def forgery_protection_strategy; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def forgery_protection_strategy=(value); end
# source://actionpack/8.0.1/lib/abstract_controller/caching/fragments.rb#26
def fragment_cache_keys; end
# source://actionpack/8.0.1/lib/abstract_controller/caching/fragments.rb#26
def fragment_cache_keys=(_arg0); end
# source://actionpack/8.0.1/lib/abstract_controller/caching/fragments.rb#26
def fragment_cache_keys?; end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#70
def helpers_path; end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#70
def helpers_path=(_arg0); end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#70
def helpers_path?; end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#71
def include_all_helpers; end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#71
def include_all_helpers=(_arg0); end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#71
def include_all_helpers?; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def javascripts_dir; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def javascripts_dir=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def log_warning_on_csrf_failure; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def log_warning_on_csrf_failure=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def logger; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def logger=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/flash.rb#38
def notice; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def per_form_csrf_tokens; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def per_form_csrf_tokens=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def perform_caching; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def perform_caching=(value); end
# source://actionpack/8.0.1/lib/abstract_controller/callbacks.rb#36
def raise_on_missing_callback_actions; end
# source://actionpack/8.0.1/lib/abstract_controller/callbacks.rb#36
def raise_on_missing_callback_actions=(val); end
# source://actionpack/8.0.1/lib/action_controller/metal/redirecting.rb#17
def raise_on_open_redirects; end
# source://actionpack/8.0.1/lib/action_controller/metal/redirecting.rb#17
def raise_on_open_redirects=(val); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def relative_url_root; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def relative_url_root=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def request_forgery_protection_token; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def request_forgery_protection_token=(value); end
# source://activesupport/8.0.1/lib/active_support/rescuable.rb#15
def rescue_handlers; end
# source://activesupport/8.0.1/lib/active_support/rescuable.rb#15
def rescue_handlers=(_arg0); end
# source://activesupport/8.0.1/lib/active_support/rescuable.rb#15
def rescue_handlers?; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def stylesheets_dir; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def stylesheets_dir=(value); end
private
# source://actionview//lib/action_view/layouts.rb#328
def _layout(lookup_context, formats); end
# source://actionpack/8.0.1/lib/action_controller/base.rb#324
def _protected_ivars; end
class << self
# source://activesupport/8.0.1/lib/active_support/callbacks.rb#69
def __callbacks; end
# source://activesupport/8.0.1/lib/active_support/callbacks.rb#69
def __callbacks=(value); end
# source://actionpack/8.0.1/lib/action_controller/form_builder.rb#35
def _default_form_builder; end
# source://actionpack/8.0.1/lib/action_controller/form_builder.rb#35
def _default_form_builder=(value); end
# source://actionpack/8.0.1/lib/action_controller/form_builder.rb#35
def _default_form_builder?; end
# source://actionpack/8.0.1/lib/action_controller/metal/flash.rb#10
def _flash_types; end
# source://actionpack/8.0.1/lib/action_controller/metal/flash.rb#10
def _flash_types=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/flash.rb#10
def _flash_types?; end
# source://actionpack/8.0.1/lib/abstract_controller/helpers.rb#13
def _helper_methods; end
# source://actionpack/8.0.1/lib/abstract_controller/helpers.rb#13
def _helper_methods=(value); end
# source://actionpack/8.0.1/lib/abstract_controller/helpers.rb#13
def _helper_methods?; end
# source://actionpack/8.0.1/lib/abstract_controller/helpers.rb#17
def _helpers; end
# source://actionview//lib/action_view/layouts.rb#211
def _layout; end
# source://actionview//lib/action_view/layouts.rb#211
def _layout=(value); end
# source://actionview//lib/action_view/layouts.rb#211
def _layout?; end
# source://actionview//lib/action_view/layouts.rb#212
def _layout_conditions; end
# source://actionview//lib/action_view/layouts.rb#212
def _layout_conditions=(value); end
# source://actionview//lib/action_view/layouts.rb#212
def _layout_conditions?; end
# source://activesupport/8.0.1/lib/active_support/callbacks.rb#915
def _process_action_callbacks; end
# source://activesupport/8.0.1/lib/active_support/callbacks.rb#919
def _process_action_callbacks=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/renderers.rb#31
def _renderers; end
# source://actionpack/8.0.1/lib/action_controller/metal/renderers.rb#31
def _renderers=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/renderers.rb#31
def _renderers?; end
# source://actionpack/8.0.1/lib/abstract_controller/caching.rb#44
def _view_cache_dependencies; end
# source://actionpack/8.0.1/lib/abstract_controller/caching.rb#44
def _view_cache_dependencies=(value); end
# source://actionpack/8.0.1/lib/abstract_controller/caching.rb#44
def _view_cache_dependencies?; end
# source://actionpack/8.0.1/lib/action_controller/metal/params_wrapper.rb#185
def _wrapper_options; end
# source://actionpack/8.0.1/lib/action_controller/metal/params_wrapper.rb#185
def _wrapper_options=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/params_wrapper.rb#185
def _wrapper_options?; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def allow_forgery_protection; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def allow_forgery_protection=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def asset_host; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def asset_host=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def assets_dir; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def assets_dir=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def csrf_token_storage_strategy; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def csrf_token_storage_strategy=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def default_asset_host_protocol; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def default_asset_host_protocol=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def default_static_extension; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def default_static_extension=(value); end
# source://actionpack/8.0.1/lib/action_dispatch/routing/url_for.rb#100
def default_url_options; end
# source://actionpack/8.0.1/lib/action_dispatch/routing/url_for.rb#100
def default_url_options=(value); end
# source://actionpack/8.0.1/lib/action_dispatch/routing/url_for.rb#100
def default_url_options?; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def enable_fragment_cache_logging; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def enable_fragment_cache_logging=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/etag_with_template_digest.rb#31
def etag_with_template_digest; end
# source://actionpack/8.0.1/lib/action_controller/metal/etag_with_template_digest.rb#31
def etag_with_template_digest=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/etag_with_template_digest.rb#31
def etag_with_template_digest?; end
# source://actionpack/8.0.1/lib/action_controller/metal/conditional_get.rb#15
def etaggers; end
# source://actionpack/8.0.1/lib/action_controller/metal/conditional_get.rb#15
def etaggers=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/conditional_get.rb#15
def etaggers?; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def forgery_protection_origin_check; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def forgery_protection_origin_check=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def forgery_protection_strategy; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def forgery_protection_strategy=(value); end
# source://actionpack/8.0.1/lib/abstract_controller/caching/fragments.rb#26
def fragment_cache_keys; end
# source://actionpack/8.0.1/lib/abstract_controller/caching/fragments.rb#26
def fragment_cache_keys=(value); end
# source://actionpack/8.0.1/lib/abstract_controller/caching/fragments.rb#26
def fragment_cache_keys?; end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#70
def helpers_path; end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#70
def helpers_path=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#70
def helpers_path?; end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#71
def include_all_helpers; end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#71
def include_all_helpers=(value); end
# source://actionpack/8.0.1/lib/action_controller/metal/helpers.rb#71
def include_all_helpers?; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def javascripts_dir; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def javascripts_dir=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def log_warning_on_csrf_failure; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def log_warning_on_csrf_failure=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def logger; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def logger=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def per_form_csrf_tokens; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def per_form_csrf_tokens=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def perform_caching; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def perform_caching=(value); end
# source://actionpack/8.0.1/lib/abstract_controller/callbacks.rb#36
def raise_on_missing_callback_actions; end
# source://actionpack/8.0.1/lib/abstract_controller/callbacks.rb#36
def raise_on_missing_callback_actions=(val); end
# source://actionpack/8.0.1/lib/action_controller/metal/redirecting.rb#17
def raise_on_open_redirects; end
# source://actionpack/8.0.1/lib/action_controller/metal/redirecting.rb#17
def raise_on_open_redirects=(val); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def relative_url_root; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def relative_url_root=(value); end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def request_forgery_protection_token; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def request_forgery_protection_token=(value); end
# source://activesupport/8.0.1/lib/active_support/rescuable.rb#15
def rescue_handlers; end
# source://activesupport/8.0.1/lib/active_support/rescuable.rb#15
def rescue_handlers=(value); end
# source://activesupport/8.0.1/lib/active_support/rescuable.rb#15
def rescue_handlers?; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#115
def stylesheets_dir; end
# source://activesupport/8.0.1/lib/active_support/configurable.rb#116
def stylesheets_dir=(value); end
# source://actionpack/8.0.1/lib/action_controller/base.rb#222
def without_modules(*modules); end
private
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr___callbacks; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr___callbacks=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr__default_form_builder; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr__default_form_builder=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr__flash_types; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr__flash_types=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr__helper_methods; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr__helper_methods=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr__layout; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr__layout=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr__layout_conditions; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr__layout_conditions=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr__renderers; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr__renderers=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr__view_cache_dependencies; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr__view_cache_dependencies=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr__wrapper_options; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr__wrapper_options=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr_default_url_options; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr_default_url_options=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr_etag_with_template_digest; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr_etag_with_template_digest=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr_etaggers; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr_etaggers=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr_fragment_cache_keys; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr_fragment_cache_keys=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr_helpers_path; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr_helpers_path=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr_include_all_helpers; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr_include_all_helpers=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr_middleware_stack; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr_middleware_stack=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr_rescue_handlers; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr_rescue_handlers=(new_value); end
end
end
# :include: ../README.rdoc
#
# source://actionview//lib/action_view/gem_version.rb#3
module ActionView
extend ::ActiveSupport::Autoload
class << self
# source://actionview//lib/action_view/deprecator.rb#4
def deprecator; end
# source://actionview//lib/action_view.rb#93
def eager_load!; end
# Returns the currently loaded version of Action View as a +Gem::Version+.
#
# source://actionview//lib/action_view/gem_version.rb#5
def gem_version; end
# Returns the currently loaded version of Action View as a +Gem::Version+.
#
# source://actionview//lib/action_view/version.rb#7
def version; end
end
end
# This class defines the interface for a renderer. Each class that
# subclasses +AbstractRenderer+ is used by the base +Renderer+ class to
# render a specific type of object.
#
# The base +Renderer+ class uses its +render+ method to delegate to the
# renderers. These currently consist of
#
# PartialRenderer - Used for rendering partials
# TemplateRenderer - Used for rendering other types of templates
# StreamingTemplateRenderer - Used for streaming
#
# Whenever the +render+ method is called on the base +Renderer+ class, a new
# renderer object of the correct type is created, and the +render+ method on
# that new object is called in turn. This abstracts the set up and rendering
# into a separate classes for partials and templates.
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#21
class ActionView::AbstractRenderer
# @return [AbstractRenderer] a new instance of AbstractRenderer
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#24
def initialize(lookup_context); end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#22
def any_templates?(*_arg0, **_arg1, &_arg2); end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#22
def formats(*_arg0, **_arg1, &_arg2); end
# @raise [NotImplementedError]
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#28
def render; end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#22
def template_exists?(*_arg0, **_arg1, &_arg2); end
private
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#182
def build_rendered_collection(templates, spacer); end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#178
def build_rendered_template(content, template); end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#159
def extract_details(options); end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#171
def prepend_formats(formats); end
end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#157
ActionView::AbstractRenderer::NO_DETAILS = T.let(T.unsafe(nil), Hash)
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#32
module ActionView::AbstractRenderer::ObjectRendering
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#37
def initialize(lookup_context, options); end
private
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#43
def local_variable(path); end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#92
def merge_prefix_into_object_path(prefix, object_path); end
# Obtains the path to where the object's partial is located. If the object
# responds to +to_partial_path+, then +to_partial_path+ will be called and
# will provide the path. If the object does not respond to +to_partial_path+,
# then an +ArgumentError+ is raised.
#
# If +prefix_partial_path_with_controller_namespace+ is true, then this
# method will prefix the partial paths with a namespace.
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#76
def partial_path(object, view); end
# @raise [ArgumentError]
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#61
def raise_invalid_identifier(path); end
# @raise [ArgumentError]
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#65
def raise_invalid_option_as(as); end
end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#54
ActionView::AbstractRenderer::ObjectRendering::IDENTIFIER_ERROR_MESSAGE = T.let(T.unsafe(nil), String)
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#57
ActionView::AbstractRenderer::ObjectRendering::OPTION_AS_ERROR_MESSAGE = T.let(T.unsafe(nil), String)
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#33
ActionView::AbstractRenderer::ObjectRendering::PREFIXED_PARTIAL_NAMES = T.let(T.unsafe(nil), Concurrent::Map)
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#110
class ActionView::AbstractRenderer::RenderedCollection
# @return [RenderedCollection] a new instance of RenderedCollection
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#117
def initialize(rendered_templates, spacer); end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#122
def body; end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#126
def format; end
# Returns the value of attribute rendered_templates.
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#115
def rendered_templates; end
class << self
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#111
def empty(format); end
end
end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#130
class ActionView::AbstractRenderer::RenderedCollection::EmptyCollection
# @return [EmptyCollection] a new instance of EmptyCollection
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#133
def initialize(format); end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#137
def body; end
# Returns the value of attribute format.
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#131
def format; end
end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#141
class ActionView::AbstractRenderer::RenderedTemplate
# @return [RenderedTemplate] a new instance of RenderedTemplate
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#144
def initialize(body, template); end
# Returns the value of attribute body.
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#142
def body; end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#149
def format; end
# Returns the value of attribute template.
#
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#142
def template; end
end
# source://actionview//lib/action_view/renderer/abstract_renderer.rb#153
ActionView::AbstractRenderer::RenderedTemplate::EMPTY_SPACER = T.let(T.unsafe(nil), T.untyped)
# = Action View Errors
#
# source://actionview//lib/action_view/template/error.rb#8
class ActionView::ActionViewError < ::StandardError; end
# = Action View \Base
#
# Action View templates can be written in several ways.
# If the template file has a .erb extension, then it uses the erubi[https://rubygems.org/gems/erubi]
# template system which can embed Ruby into an HTML document.
# If the template file has a .builder extension, then Jim Weirich's Builder::XmlMarkup library is used.
#
# == ERB
#
# You trigger ERB by using embeddings such as <% %>, <% -%>, and <%= %>. The <%= %> tag set is used when you want output. Consider the
# following loop for names:
#
# Names of all the people
# <% @people.each do |person| %>
# Name: <%= person.name %>
# <% end %>
#
# The loop is set up in regular embedding tags <% %>, and the name is written using the output embedding tag <%= %>. Note that this
# is not just a usage suggestion. Regular output functions like print or puts won't work with ERB templates. So this would be wrong:
#
# <%# WRONG %>
# Hi, Mr. <% puts "Frodo" %>
#
# If you absolutely must write from within a function use +concat+.
#
# When on a line that only contains whitespaces except for the tag, <% %> suppresses leading and trailing whitespace,
# including the trailing newline. <% %> and <%- -%> are the same.
# Note however that <%= %> and <%= -%> are different: only the latter removes trailing whitespaces.
#
# === Using sub templates
#
# Using sub templates allows you to sidestep tedious replication and extract common display structures in shared templates. The
# classic example is the use of a header and footer (even though the Action Pack-way would be to use Layouts):
#
# <%= render "application/header" %>
# Something really specific and terrific
# <%= render "application/footer" %>
#
# As you see, we use the output embeddings for the render methods. The render call itself will just return a string holding the
# result of the rendering. The output embedding writes it to the current template.
#
# But you don't have to restrict yourself to static includes. Templates can share variables amongst themselves by using instance
# variables defined using the regular embedding tags. Like this:
#
# <% @page_title = "A Wonderful Hello" %>
# <%= render "application/header" %>
#
# Now the header can pick up on the @page_title variable and use it for outputting a title tag:
#
#
<%= @page_title %>
#
# === Passing local variables to sub templates
#
# You can pass local variables to sub templates by using a hash with the variable names as keys and the objects as values:
#
# <%= render "application/header", { headline: "Welcome", person: person } %>
#
# These can now be accessed in application/header with:
#
# Headline: <%= headline %>
# First name: <%= person.first_name %>
#
# The local variables passed to sub templates can be accessed as a hash using the local_assigns hash. This lets you access the
# variables as:
#
# Headline: <%= local_assigns[:headline] %>
#
# This is useful in cases where you aren't sure if the local variable has been assigned. Alternatively, you could also use
# defined? headline to first check if the variable has been assigned before using it.
#
# By default, templates will accept any locals as keyword arguments. To restrict what locals a template accepts, add a locals: magic comment:
#
# <%# locals: (headline:) %>
#
# Headline: <%= headline %>
#
# In cases where the local variables are optional, declare the keyword argument with a default value:
#
# <%# locals: (headline: nil) %>
#
# <% unless headline.nil? %>
# Headline: <%= headline %>
# <% end %>
#
# Read more about strict locals in {Action View Overview}[https://guides.rubyonrails.org/action_view_overview.html#strict-locals]
# in the guides.
#
# === Template caching
#
# By default, \Rails will compile each template to a method in order to render it. When you alter a template,
# \Rails will check the file's modification time and recompile it in development mode.
#
# == Builder
#
# Builder templates are a more programmatic alternative to ERB. They are especially useful for generating XML content. An XmlMarkup object
# named +xml+ is automatically made available to templates with a .builder extension.
#
# Here are some basic examples:
#
# xml.em("emphasized") # => emphasized
# xml.em { xml.b("emph & bold") } # => emph & bold
# xml.a("A Link", "href" => "http://onestepback.org") # => A Link
# xml.target("name" => "compile", "option" => "fast") # =>
# # NOTE: order of attributes is not specified.
#
# Any method with a block will be treated as an XML markup tag with nested markup in the block. For example, the following:
#
# xml.div do
# xml.h1(@person.name)
# xml.p(@person.bio)
# end
#
# would produce something like:
#
#
#
David Heinemeier Hansson
#
A product of Danish Design during the Winter of '79...
#
#
# Here is a full-length RSS example actually used on Basecamp:
#
# xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
# xml.channel do
# xml.title(@feed_title)
# xml.link(@url)
# xml.description "Basecamp: Recent items"
# xml.language "en-us"
# xml.ttl "40"
#
# @recent_items.each do |item|
# xml.item do
# xml.title(item_title(item))
# xml.description(item_description(item)) if item_description(item)
# xml.pubDate(item_pubDate(item))
# xml.guid(@person.firm.account.url + @recent_items.url(item))
# xml.link(@person.firm.account.url + @recent_items.url(item))
#
# xml.tag!("dc:creator", item.author_name) if item_has_creator?(item)
# end
# end
# end
# end
#
# For more information on Builder please consult the {source code}[https://github.com/rails/builder].
#
# source://actionview//lib/action_view/base.rb#157
class ActionView::Base
include ::ActionView::Context
include ::ERB::Escape
include ::ERB::Util
include ::ActiveSupport::CoreExt::ERBUtil
include ::ActiveSupport::CoreExt::ERBUtilPrivate
include ::ActiveSupport::Benchmarkable
include ::ActionView::Helpers::ActiveModelHelper
include ::ActionView::Helpers::AssetUrlHelper
include ::ActionView::Helpers::CaptureHelper
include ::ActionView::Helpers::OutputSafetyHelper
include ::ActionView::Helpers::TagHelper
include ::ActionView::Helpers::AssetTagHelper
include ::ActionView::Helpers::AtomFeedHelper
include ::ActionView::Helpers::CacheHelper
include ::ActionView::Helpers::ContentExfiltrationPreventionHelper
include ::ActionView::Helpers::UrlHelper
include ::ActionView::Helpers::SanitizeHelper
include ::ActionView::Helpers::ControllerHelper
include ::ActionView::Helpers::CspHelper
include ::ActionView::Helpers::CsrfHelper
include ::ActionView::Helpers::DateHelper
include ::ActionView::Helpers::DebugHelper
include ::ActionView::Helpers::TextHelper
include ::ActionView::Helpers::FormTagHelper
include ::ActionView::ModelNaming
include ::ActionView::RecordIdentifier
include ::ActionView::Helpers::FormHelper
include ::ActionView::Helpers::TranslationHelper
include ::ActionView::Helpers::FormOptionsHelper
include ::ActionView::Helpers::JavaScriptHelper
include ::ActionView::Helpers::NumberHelper
include ::ActionView::Helpers::RenderingHelper
include ::ActionView::Helpers
extend ::ActionView::Helpers::UrlHelper::ClassMethods
extend ::ActionView::Helpers::SanitizeHelper::ClassMethods
# :startdoc:
#
# @return [Base] a new instance of Base
#
# source://actionview//lib/action_view/base.rb#244
def initialize(lookup_context, assigns, controller); end
# source://actionview//lib/action_view/base.rb#181
def _routes; end
# source://actionview//lib/action_view/base.rb#181
def _routes=(_arg0); end
# source://actionview//lib/action_view/base.rb#181
def _routes?; end
# source://actionview//lib/action_view/base.rb#261
def _run(method, template, locals, buffer, add_to_stack: T.unsafe(nil), has_strict_locals: T.unsafe(nil), &block); end
# source://actionview//lib/action_view/base.rb#179
def annotate_rendered_view_with_filenames; end
# source://actionview//lib/action_view/base.rb#179
def annotate_rendered_view_with_filenames=(val); end
# source://actionview//lib/action_view/base.rb#223
def assign(new_assigns); end
# source://activesupport/8.0.1/lib/active_support/core_ext/module/attr_internal.rb#43
def assigns; end
# source://activesupport/8.0.1/lib/active_support/core_ext/module/attr_internal.rb#43
def assigns=(_arg0); end
# source://actionview//lib/action_view/base.rb#176
def automatically_disable_submit_tag; end
# source://actionview//lib/action_view/base.rb#176
def automatically_disable_submit_tag=(val); end
# @raise [NotImplementedError]
#
# source://actionview//lib/action_view/base.rb#287
def compiled_method_container; end
# source://activesupport/8.0.1/lib/active_support/core_ext/module/attr_internal.rb#43
def config; end
# source://activesupport/8.0.1/lib/active_support/core_ext/module/attr_internal.rb#43
def config=(_arg0); end
# source://actionview//lib/action_view/helpers/translation_helper.rb#18
def debug_missing_translation; end
# source://actionview//lib/action_view/helpers/translation_helper.rb#18
def debug_missing_translation=(val); end
# source://actionview//lib/action_view/base.rb#173
def default_formats; end
# source://actionview//lib/action_view/base.rb#173
def default_formats=(val); end
# source://actionview//lib/action_view/base.rb#161
def field_error_proc; end
# source://actionview//lib/action_view/base.rb#161
def field_error_proc=(val); end
# source://actionview//lib/action_view/base.rb#221
def formats(*_arg0, **_arg1, &_arg2); end
# source://actionview//lib/action_view/base.rb#221
def formats=(arg); end
# source://actionview//lib/action_view/base.rb#295
def in_rendering_context(options); end
# source://actionview//lib/action_view/base.rb#221
def locale(*_arg0, **_arg1, &_arg2); end
# source://actionview//lib/action_view/base.rb#221
def locale=(arg); end
# source://actionview//lib/action_view/base.rb#182
def logger; end
# source://actionview//lib/action_view/base.rb#182
def logger=(_arg0); end
# source://actionview//lib/action_view/base.rb#182
def logger?; end
# Returns the value of attribute lookup_context.
#
# source://actionview//lib/action_view/base.rb#218
def lookup_context; end
# source://actionview//lib/action_view/base.rb#170
def prefix_partial_path_with_controller_namespace; end
# source://actionview//lib/action_view/base.rb#170
def prefix_partial_path_with_controller_namespace=(_arg0); end
# source://actionview//lib/action_view/base.rb#170
def prefix_partial_path_with_controller_namespace?; end
# source://actionview//lib/action_view/base.rb#165
def streaming_completion_on_exception; end
# source://actionview//lib/action_view/base.rb#165
def streaming_completion_on_exception=(val); end
# source://actionview//lib/action_view/base.rb#221
def view_paths(*_arg0, **_arg1, &_arg2); end
# source://actionview//lib/action_view/base.rb#221
def view_paths=(arg); end
# Returns the value of attribute view_renderer.
#
# source://actionview//lib/action_view/base.rb#218
def view_renderer; end
class << self
# source://actionview//lib/action_view/base.rb#181
def _routes; end
# source://actionview//lib/action_view/base.rb#181
def _routes=(value); end
# source://actionview//lib/action_view/base.rb#181
def _routes?; end
# source://actionview//lib/action_view/base.rb#179
def annotate_rendered_view_with_filenames; end
# source://actionview//lib/action_view/base.rb#179
def annotate_rendered_view_with_filenames=(val); end
# source://actionview//lib/action_view/base.rb#176
def automatically_disable_submit_tag; end
# source://actionview//lib/action_view/base.rb#176
def automatically_disable_submit_tag=(val); end
# source://actionview//lib/action_view/base.rb#187
def cache_template_loading; end
# source://actionview//lib/action_view/base.rb#191
def cache_template_loading=(value); end
# @return [Boolean]
#
# source://actionview//lib/action_view/base.rb#213
def changed?(other); end
# source://actionview//lib/action_view/helpers/translation_helper.rb#18
def debug_missing_translation; end
# source://actionview//lib/action_view/helpers/translation_helper.rb#18
def debug_missing_translation=(val); end
# source://actionview//lib/action_view/helpers/form_helper.rb#2764
def default_form_builder; end
# source://actionview//lib/action_view/helpers/form_helper.rb#2764
def default_form_builder=(val); end
# source://actionview//lib/action_view/base.rb#173
def default_formats; end
# source://actionview//lib/action_view/base.rb#173
def default_formats=(val); end
# :stopdoc:
#
# source://actionview//lib/action_view/base.rb#230
def empty; end
# source://actionview//lib/action_view/base.rb#185
def erb_trim_mode=(arg); end
# source://actionview//lib/action_view/base.rb#161
def field_error_proc; end
# source://actionview//lib/action_view/base.rb#161
def field_error_proc=(val); end
# source://actionview//lib/action_view/base.rb#182
def logger; end
# source://actionview//lib/action_view/base.rb#182
def logger=(value); end
# source://actionview//lib/action_view/base.rb#182
def logger?; end
# source://actionview//lib/action_view/base.rb#170
def prefix_partial_path_with_controller_namespace; end
# source://actionview//lib/action_view/base.rb#170
def prefix_partial_path_with_controller_namespace=(value); end
# source://actionview//lib/action_view/base.rb#170
def prefix_partial_path_with_controller_namespace?; end
# source://actionview//lib/action_view/base.rb#165
def streaming_completion_on_exception; end
# source://actionview//lib/action_view/base.rb#165
def streaming_completion_on_exception=(val); end
# source://actionview//lib/action_view/base.rb#238
def with_context(context, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end
# source://actionview//lib/action_view/base.rb#199
def with_empty_template_cache; end
# source://actionview//lib/action_view/base.rb#234
def with_view_paths(view_paths, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end
# @return [Boolean]
#
# source://actionview//lib/action_view/base.rb#195
def xss_safe?; end
private
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr__routes; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr__routes=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr_logger; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr_logger=(new_value); end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15
def __class_attr_prefix_partial_path_with_controller_namespace; end
# source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17
def __class_attr_prefix_partial_path_with_controller_namespace=(new_value); end
end
end
# source://actionview//lib/action_view/cache_expiry.rb#4
module ActionView::CacheExpiry; end
# source://actionview//lib/action_view/cache_expiry.rb#5
class ActionView::CacheExpiry::ViewReloader
# @return [ViewReloader] a new instance of ViewReloader
#
# source://actionview//lib/action_view/cache_expiry.rb#6
def initialize(watcher:, &block); end
# source://actionview//lib/action_view/cache_expiry.rb#21
def execute; end
# @return [Boolean]
#
# source://actionview//lib/action_view/cache_expiry.rb#16
def updated?; end
private
# source://actionview//lib/action_view/cache_expiry.rb#64
def all_view_paths; end
# source://actionview//lib/action_view/cache_expiry.rb#37
def build_watcher; end
# source://actionview//lib/action_view/cache_expiry.rb#60
def dirs_to_watch; end
# source://actionview//lib/action_view/cache_expiry.rb#55
def rebuild_watcher; end
# source://actionview//lib/action_view/cache_expiry.rb#33
def reload!; end
end
# source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#6
module ActionView::CollectionCaching
extend ::ActiveSupport::Concern
private
# source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#20
def cache_collection_render(instrumentation_payload, view, template, collection); end
# @return [Boolean]
#
# source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#54
def callable_cache_key?; end
# source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#58
def collection_by_cache_keys(view, template, collection); end
# source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#71
def expanded_cache_key(key, view, template, digest_path); end
# `order_by` is an enumerable object containing keys of the cache,
# all keys are passed in whether found already or not.
#
# `cached_partials` is a hash. If the value exists
# it represents the rendered partial from the cache
# otherwise `Hash#fetch` will take the value of its block.
#
# This method expects a block that will return the rendered
# partial. An example is to render all results
# for each element that was not found in the cache and store it as an array.
# Order it so that the first empty cache element in `cached_partials`
# corresponds to the first element in `rendered_partials`.
#
# If the partial is not already cached it will also be
# written back to the underlying cache store.
#
# source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#91
def fetch_or_cache_partial(cached_partials, template, order_by:); end
# @return [Boolean]
#
# source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#16
def will_cache?(options, view); end
end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#33
class ActionView::CollectionRenderer < ::ActionView::PartialRenderer
include ::ActionView::AbstractRenderer::ObjectRendering
# source://actionview//lib/action_view/renderer/collection_renderer.rb#130
def render_collection_derive_partial(collection, context, block); end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#112
def render_collection_with_partial(collection, partial, context, block); end
private
# source://actionview//lib/action_view/renderer/collection_renderer.rb#182
def collection_with_template(view, template, layout, collection); end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#153
def render_collection(collection, view, path, template, layout, block); end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#148
def retrieve_variable(path); end
end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#36
class ActionView::CollectionRenderer::CollectionIterator
include ::Enumerable
# @return [CollectionIterator] a new instance of CollectionIterator
#
# source://actionview//lib/action_view/renderer/collection_renderer.rb#39
def initialize(collection); end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#43
def each(&blk); end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#51
def length; end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#55
def preload!; end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#47
def size; end
end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#100
class ActionView::CollectionRenderer::MixedCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator
# @return [MixedCollectionIterator] a new instance of MixedCollectionIterator
#
# source://actionview//lib/action_view/renderer/collection_renderer.rb#101
def initialize(collection, paths); end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#106
def each_with_info; end
end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#78
class ActionView::CollectionRenderer::PreloadCollectionIterator < ::ActionView::CollectionRenderer::SameCollectionIterator
# @return [PreloadCollectionIterator] a new instance of PreloadCollectionIterator
#
# source://actionview//lib/action_view/renderer/collection_renderer.rb#79
def initialize(collection, path, variables, relation); end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#89
def each_with_info; end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#85
def from_collection(collection); end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#95
def preload!; end
end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#60
class ActionView::CollectionRenderer::SameCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator
# @return [SameCollectionIterator] a new instance of SameCollectionIterator
#
# source://actionview//lib/action_view/renderer/collection_renderer.rb#61
def initialize(collection, path, variables); end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#71
def each_with_info; end
# source://actionview//lib/action_view/renderer/collection_renderer.rb#67
def from_collection(collection); end
end
# = Action View Context
#
# Action View contexts are supplied to Action Controller to render a template.
# The default Action View context is ActionView::Base.
#
# In order to work with Action Controller, a Context must just include this
# module. The initialization of the variables used by the context
# (@output_buffer, @view_flow, and @virtual_path) is responsibility of the
# object that includes this module (although you can call _prepare_context
# defined below).
#
# source://actionview//lib/action_view/context.rb#14
module ActionView::Context
# Encapsulates the interaction with the view flow so it
# returns the correct buffer on +yield+. This is usually
# overwritten by helpers to add more behavior.
#
# source://actionview//lib/action_view/context.rb#27
def _layout_for(name = T.unsafe(nil)); end
# Prepares the context by setting the appropriate instance variables.
#
# source://actionview//lib/action_view/context.rb#18
def _prepare_context; end
# Returns the value of attribute output_buffer.
#
# source://actionview//lib/action_view/context.rb#15
def output_buffer; end
# Sets the attribute output_buffer
#
# @param value the value to set the attribute output_buffer to.
#
# source://actionview//lib/action_view/context.rb#15
def output_buffer=(_arg0); end
# Returns the value of attribute view_flow.
#
# source://actionview//lib/action_view/context.rb#15
def view_flow; end
# Sets the attribute view_flow
#
# @param value the value to set the attribute view_flow to.
#
# source://actionview//lib/action_view/context.rb#15
def view_flow=(_arg0); end
end
# source://actionview//lib/action_view/dependency_tracker.rb#8
class ActionView::DependencyTracker
extend ::ActiveSupport::Autoload
class << self
# source://actionview//lib/action_view/dependency_tracker.rb#17
def find_dependencies(name, template, view_paths = T.unsafe(nil)); end
# source://actionview//lib/action_view/dependency_tracker.rb#24
def register_tracker(extension, tracker); end
# source://actionview//lib/action_view/dependency_tracker.rb#35
def remove_tracker(handler); end
end
end
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#5
class ActionView::DependencyTracker::ERBTracker
# @return [ERBTracker] a new instance of ERBTracker
#
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#72
def initialize(name, template, view_paths = T.unsafe(nil)); end
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#76
def dependencies; end
private
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#104
def add_dependencies(render_dependencies, arguments, pattern); end
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#112
def add_dynamic_dependency(dependencies, dependency); end
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#118
def add_static_dependency(dependencies, dependency, quote_type); end
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#88
def directory; end
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#158
def explicit_dependencies; end
# Returns the value of attribute name.
#
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#80
def name; end
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#92
def render_dependencies; end
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#84
def source; end
# Returns the value of attribute template.
#
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#80
def template; end
class << self
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#68
def call(name, template, view_paths = T.unsafe(nil)); end
# @return [Boolean]
#
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#64
def supports_view_paths?; end
end
end
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#6
ActionView::DependencyTracker::ERBTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp)
# A valid ruby identifier - suitable for class, method and specially variable names
#
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#9
ActionView::DependencyTracker::ERBTracker::IDENTIFIER = T.let(T.unsafe(nil), Regexp)
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#58
ActionView::DependencyTracker::ERBTracker::LAYOUT_DEPENDENCY = T.let(T.unsafe(nil), Regexp)
# Part of any hash containing the :layout key
#
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#36
ActionView::DependencyTracker::ERBTracker::LAYOUT_HASH_KEY = T.let(T.unsafe(nil), Regexp)
# Part of any hash containing the :partial key
#
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#30
ActionView::DependencyTracker::ERBTracker::PARTIAL_HASH_KEY = T.let(T.unsafe(nil), Regexp)
# Matches:
# partial: "comments/comment", collection: @all_comments => "comments/comment"
# (object: @single_comment, partial: "comments/comment") => "comments/comment"
#
# "comments/comments"
# 'comments/comments'
# ('comments/comments')
#
# (@topic) => "topics/topic"
# topics => "topics/topic"
# (message.topics) => "topics/topic"
#
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#52
ActionView::DependencyTracker::ERBTracker::RENDER_ARGUMENTS = T.let(T.unsafe(nil), Regexp)
# A simple string literal. e.g. "School's out!"
#
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#23
ActionView::DependencyTracker::ERBTracker::STRING = T.let(T.unsafe(nil), Regexp)
# Any kind of variable name. e.g. @instance, @@class, $global or local.
# Possibly following a method call chain
#
# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#16
ActionView::DependencyTracker::ERBTracker::VARIABLE_OR_METHOD_CHAIN = T.let(T.unsafe(nil), Regexp)
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#5
class ActionView::DependencyTracker::RubyTracker
# @return [RubyTracker] a new instance of RubyTracker
#
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#20
def initialize(name, template, view_paths = T.unsafe(nil), parser_class: T.unsafe(nil)); end
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#12
def dependencies; end
private
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#38
def explicit_dependencies; end
# Returns the value of attribute name.
#
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#26
def name; end
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#28
def render_dependencies; end
# Returns the value of attribute template.
#
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#26
def template; end
# Returns the value of attribute view_paths.
#
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#26
def view_paths; end
class << self
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#8
def call(name, template, view_paths = T.unsafe(nil)); end
# @return [Boolean]
#
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#16
def supports_view_paths?; end
end
end
# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#6
ActionView::DependencyTracker::RubyTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp)
# source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#5
class ActionView::DependencyTracker::WildcardResolver
# @return [WildcardResolver] a new instance of WildcardResolver
#
# source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#6
def initialize(view_paths, dependencies); end
# source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#13
def resolve; end
private
# Returns the value of attribute explicit_dependencies.
#
# source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#20
def explicit_dependencies; end
# source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#22
def resolved_wildcard_dependencies; end
# Returns the value of attribute view_paths.
#
# source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#20
def view_paths; end
# Returns the value of attribute wildcard_dependencies.
#
# source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#20
def wildcard_dependencies; end
end
# source://actionview//lib/action_view/digestor.rb#6
class ActionView::Digestor
class << self
# Supported options:
#
# * name - Template name
# * format - Template format
# * +finder+ - An instance of ActionView::LookupContext
# * dependencies - An array of dependent views
#
# source://actionview//lib/action_view/digestor.rb#16
def digest(name:, finder:, format: T.unsafe(nil), dependencies: T.unsafe(nil)); end
# source://actionview//lib/action_view/digestor.rb#38
def logger; end
# Create a dependency tree for template named +name+.
#
# source://actionview//lib/action_view/digestor.rb#43
def tree(name, finder, partial = T.unsafe(nil), seen = T.unsafe(nil)); end
private
# source://actionview//lib/action_view/digestor.rb#71
def find_template(finder, name, prefixes, partial, keys); end
end
end
# source://actionview//lib/action_view/digestor.rb#121
class ActionView::Digestor::Injected < ::ActionView::Digestor::Node
# source://actionview//lib/action_view/digestor.rb#122
def digest(finder, _ = T.unsafe(nil)); end
end
# source://actionview//lib/action_view/digestor.rb#117
class ActionView::Digestor::Missing < ::ActionView::Digestor::Node
# source://actionview//lib/action_view/digestor.rb#118
def digest(finder, _ = T.unsafe(nil)); end
end
# source://actionview//lib/action_view/digestor.rb#78
class ActionView::Digestor::Node
# @return [Node] a new instance of Node
#
# source://actionview//lib/action_view/digestor.rb#86
def initialize(name, logical_name, template, children = T.unsafe(nil)); end
# Returns the value of attribute children.
#
# source://actionview//lib/action_view/digestor.rb#79
def children; end
# source://actionview//lib/action_view/digestor.rb#97
def dependency_digest(finder, stack); end
# source://actionview//lib/action_view/digestor.rb#93
def digest(finder, stack = T.unsafe(nil)); end
# Returns the value of attribute logical_name.
#
# source://actionview//lib/action_view/digestor.rb#79
def logical_name; end
# Returns the value of attribute name.
#
# source://actionview//lib/action_view/digestor.rb#79
def name; end
# Returns the value of attribute template.
#
# source://actionview//lib/action_view/digestor.rb#79
def template; end
# source://actionview//lib/action_view/digestor.rb#110
def to_dep_map; end
class << self
# source://actionview//lib/action_view/digestor.rb#81
def create(name, logical_name, template, partial); end
end
end
# source://actionview//lib/action_view/digestor.rb#125
class ActionView::Digestor::NullLogger
class << self
# source://actionview//lib/action_view/digestor.rb#126
def debug(_); end
# source://actionview//lib/action_view/digestor.rb#127
def error(_); end
end
end
# source://actionview//lib/action_view/digestor.rb#115
class ActionView::Digestor::Partial < ::ActionView::Digestor::Node; end
# source://actionview//lib/action_view.rb#35
ActionView::ENCODING_FLAG = T.let(T.unsafe(nil), String)
# source://actionview//lib/action_view/template/error.rb#11
class ActionView::EncodingError < ::StandardError; end
# A resolver that loads files from the filesystem.
#
# source://actionview//lib/action_view/template/resolver.rb#90
class ActionView::FileSystemResolver < ::ActionView::Resolver
# @raise [ArgumentError]
# @return [FileSystemResolver] a new instance of FileSystemResolver
#
# source://actionview//lib/action_view/template/resolver.rb#93
def initialize(path); end
# @return [Boolean]
#
# source://actionview//lib/action_view/template/resolver.rb#112
def ==(resolver); end
# source://actionview//lib/action_view/template/resolver.rb#117
def all_template_paths; end
# source://actionview//lib/action_view/template/resolver.rb#126
def built_templates; end
# source://actionview//lib/action_view/template/resolver.rb#101
def clear_cache; end
# @return [Boolean]
#
# source://actionview//lib/action_view/template/resolver.rb#112
def eql?(resolver); end
# Returns the value of attribute path.
#
# source://actionview//lib/action_view/template/resolver.rb#91
def path; end
# source://actionview//lib/action_view/template/resolver.rb#107
def to_path; end
# source://actionview//lib/action_view/template/resolver.rb#107
def to_s; end
private
# source://actionview//lib/action_view/template/resolver.rb#131
def _find_all(name, prefix, partial, details, key, locals); end
# source://actionview//lib/action_view/template/resolver.rb#150
def build_unbound_template(template); end
# source://actionview//lib/action_view/template/resolver.rb#208
def escape_entry(entry); end
# source://actionview//lib/action_view/template/resolver.rb#180
def filter_and_sort_by_details(templates, requested_details); end
# source://actionview//lib/action_view/template/resolver.rb#146
def source_for_template(template); end
# Safe glob within @path
#
# source://actionview//lib/action_view/template/resolver.rb#195
def template_glob(glob); end
# source://actionview//lib/action_view/template/resolver.rb#163
def unbound_templates_from_path(path); end
end
# source://actionview//lib/action_view/helpers/capture_helper.rb#6
module ActionView::Helpers
include ::ActiveSupport::Benchmarkable
include ::ActionView::Helpers::ActiveModelHelper
include ::ActionView::Helpers::AssetUrlHelper
include ::ActionView::Helpers::SanitizeHelper
include ::ActionView::Helpers::CaptureHelper
include ::ActionView::Helpers::OutputSafetyHelper
include ::ActionView::Helpers::TagHelper
include ::ActionView::Helpers::AssetTagHelper
include ::ActionView::Helpers::AtomFeedHelper
include ::ActionView::Helpers::CacheHelper
include ::ActionView::Helpers::ContentExfiltrationPreventionHelper
include ::ActionView::Helpers::ControllerHelper
include ::ActionView::Helpers::CspHelper
include ::ActionView::Helpers::CsrfHelper
include ::ActionView::Helpers::DateHelper
include ::ActionView::Helpers::DebugHelper
include ::ActionView::Helpers::TextHelper
include ::ActionView::Helpers::FormOptionsHelper
include ::ActionView::Helpers::JavaScriptHelper
include ::ActionView::Helpers::NumberHelper
include ::ActionView::Helpers::RenderingHelper
extend ::ActiveSupport::Autoload
extend ::ActiveSupport::Concern
include ::ActionView::Helpers::UrlHelper
include ::ActionView::Helpers::SanitizeHelper
include ::ActionView::Helpers::TextHelper
include ::ActionView::Helpers::FormTagHelper
include ::ActionView::Helpers::FormHelper
include ::ActionView::Helpers::TranslationHelper
mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods
mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods
class << self
# source://actionview//lib/action_view/helpers.rb#35
def eager_load!; end
end
end
# source://actionview//lib/action_view/helpers/active_model_helper.rb#8
module ActionView::Helpers::ActiveModelHelper; end
# = Active \Model Instance Tag \Helpers
#
# source://actionview//lib/action_view/helpers/active_model_helper.rb#12
module ActionView::Helpers::ActiveModelInstanceTag
# source://actionview//lib/action_view/helpers/active_model_helper.rb#20
def content_tag(type, options, *_arg2); end
# source://actionview//lib/action_view/helpers/active_model_helper.rb#36
def error_message; end
# source://actionview//lib/action_view/helpers/active_model_helper.rb#28
def error_wrapping(html_tag); end
# source://actionview//lib/action_view/helpers/active_model_helper.rb#13
def object; end
# source://actionview//lib/action_view/helpers/active_model_helper.rb#24
def tag(type, options, *_arg2); end
private
# @return [Boolean]
#
# source://actionview//lib/action_view/helpers/active_model_helper.rb#41
def object_has_errors?; end
# @return [Boolean]
#
# source://actionview//lib/action_view/helpers/active_model_helper.rb#45
def select_markup_helper?(type); end
# @return [Boolean]
#
# source://actionview//lib/action_view/helpers/active_model_helper.rb#49
def tag_generate_errors?(options); end
end
# = Action View Asset Tag \Helpers
#
# This module provides methods for generating HTML that links views to assets such
# as images, JavaScripts, stylesheets, and feeds. These methods do not verify
# the assets exist before linking to them:
#
# image_tag("rails.png")
# # =>
# stylesheet_link_tag("application")
# # =>
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#21
module ActionView::Helpers::AssetTagHelper
include ::ActionView::Helpers::AssetUrlHelper
include ::ActionView::Helpers::CaptureHelper
include ::ActionView::Helpers::OutputSafetyHelper
include ::ActionView::Helpers::TagHelper
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28
def apply_stylesheet_media_default; end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28
def apply_stylesheet_media_default=(val); end
# Returns an HTML audio tag for the +sources+. If +sources+ is a string,
# a single audio tag will be returned. If +sources+ is an array, an audio
# tag with nested source tags for each source will be returned. The
# +sources+ can be full paths, files that exist in your public audios
# directory, or Active Storage attachments.
#
# When the last parameter is a hash you can add HTML attributes using that
# parameter.
#
# audio_tag("sound")
# # =>
# audio_tag("sound.wav")
# # =>
# audio_tag("sound.wav", autoplay: true, controls: true)
# # =>
# audio_tag("sound.wav", "sound.mid")
# # =>
#
# Active Storage blobs (audios that are uploaded by the users of your app):
#
# audio_tag(user.name_pronunciation_audio)
# # =>
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#593
def audio_tag(*sources); end
# Returns a link tag that browsers and feed readers can use to auto-detect
# an RSS, Atom, or JSON feed. The +type+ can be :rss (default),
# :atom, or :json. Control the link options in url_for format
# using the +url_options+. You can modify the LINK tag itself in +tag_options+.
#
# ==== Options
#
# * :rel - Specify the relation of this link, defaults to "alternate"
# * :type - Override the auto-generated mime type
# * :title - Specify the title of the link, defaults to the +type+
#
# ==== Examples
#
# auto_discovery_link_tag
# # =>
# auto_discovery_link_tag(:atom)
# # =>
# auto_discovery_link_tag(:json)
# # =>
# auto_discovery_link_tag(:rss, {action: "feed"})
# # =>
# auto_discovery_link_tag(:rss, {action: "feed"}, {title: "My RSS"})
# # =>
# auto_discovery_link_tag(:rss, {controller: "news", action: "feed"})
# # =>
# auto_discovery_link_tag(:rss, "http://www.example.com/feed.rss", {title: "Example RSS"})
# # =>
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#271
def auto_discovery_link_tag(type = T.unsafe(nil), url_options = T.unsafe(nil), tag_options = T.unsafe(nil)); end
# Returns a link tag for a favicon managed by the asset pipeline.
#
# If a page has no link like the one generated by this helper, browsers
# ask for /favicon.ico automatically, and cache the file if the
# request succeeds. If the favicon changes it is hard to get it updated.
#
# To have better control applications may let the asset pipeline manage
# their favicon storing the file under app/assets/images, and
# using this helper to generate its corresponding link tag.
#
# The helper gets the name of the favicon file as first argument, which
# defaults to "favicon.ico", and also supports +:rel+ and +:type+ options
# to override their defaults, "icon" and "image/x-icon"
# respectively:
#
# favicon_link_tag
# # =>
#
# favicon_link_tag 'myicon.ico'
# # =>
#
# Mobile Safari looks for a different link tag, pointing to an image that
# will be used if you add the page to the home screen of an iOS device.
# The following call would generate such a tag:
#
# favicon_link_tag 'mb-icon.png', rel: 'apple-touch-icon', type: 'image/png'
# # =>
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#312
def favicon_link_tag(source = T.unsafe(nil), options = T.unsafe(nil)); end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26
def image_decoding; end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26
def image_decoding=(val); end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25
def image_loading; end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25
def image_loading=(val); end
# Returns an HTML image tag for the +source+. The +source+ can be a full
# path, a file, or an Active Storage attachment.
#
# ==== Options
#
# You can add HTML attributes using the +options+. The +options+ supports
# additional keys for convenience and conformance:
#
# * :size - Supplied as "#{width}x#{height}" or "#{number}", so "30x45" becomes
# width="30" height="45", and "50" becomes width="50" height="50".
# :size will be ignored if the value is not in the correct format.
# * :srcset - If supplied as a hash or array of [source, descriptor]
# pairs, each image path will be expanded before the list is formatted as a string.
#
# ==== Examples
#
# Assets (images that are part of your app):
#
# image_tag("icon")
# # =>
# image_tag("icon.png")
# # =>
# image_tag("icon.png", size: "16x10", alt: "Edit Entry")
# # =>
# image_tag("/icons/icon.gif", size: "16")
# # =>
# image_tag("/icons/icon.gif", height: '32', width: '32')
# # =>
# image_tag("/icons/icon.gif", class: "menu_icon")
# # =>
# image_tag("/icons/icon.gif", data: { title: 'Rails Application' })
# # =>
# image_tag("icon.png", srcset: { "icon_2x.png" => "2x", "icon_4x.png" => "4x" })
# # =>
# image_tag("pic.jpg", srcset: [["pic_1024.jpg", "1024w"], ["pic_1980.jpg", "1980w"]], sizes: "100vw")
# # =>
#
# Active Storage blobs (images that are uploaded by the users of your app):
#
# image_tag(user.avatar)
# # =>
# image_tag(user.avatar.variant(resize_to_limit: [100, 100]))
# # =>
# image_tag(user.avatar.variant(resize_to_limit: [100, 100]), size: '100')
# # =>
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#430
def image_tag(source, options = T.unsafe(nil)); end
# Returns an HTML script tag for each of the +sources+ provided.
#
# Sources may be paths to JavaScript files. Relative paths are assumed to be relative
# to assets/javascripts, full paths are assumed to be relative to the document
# root. Relative paths are idiomatic, use absolute paths only when needed.
#
# When passing paths, the ".js" extension is optional. If you do not want ".js"
# appended to the path extname: false can be set on the options.
#
# You can modify the HTML attributes of the script tag by passing a hash as the
# last argument.
#
# When the Asset Pipeline is enabled, you can pass the name of your manifest as
# source, and include other JavaScript or CoffeeScript files inside the manifest.
#
# If the server supports HTTP Early Hints, and the +defer+ option is not
# enabled, \Rails will push a 103 Early Hints response that links
# to the assets.
#
# ==== Options
#
# When the last parameter is a hash you can add HTML attributes using that
# parameter. This includes but is not limited to the following options:
#
# * :extname - Append an extension to the generated URL unless the extension
# already exists. This only applies for relative URLs.
# * :protocol - Sets the protocol of the generated URL. This option only
# applies when a relative URL and +host+ options are provided.
# * :host - When a relative URL is provided the host is added to the
# that path.
# * :skip_pipeline - This option is used to bypass the asset pipeline
# when it is set to true.
# * :nonce - When set to true, adds an automatic nonce value if
# you have Content Security Policy enabled.
# * :async - When set to +true+, adds the +async+ HTML
# attribute, allowing the script to be fetched in parallel to be parsed
# and evaluated as soon as possible.
# * :defer - When set to +true+, adds the +defer+ HTML
# attribute, which indicates to the browser that the script is meant to
# be executed after the document has been parsed. Additionally, prevents
# sending the Preload Links header.
# * :nopush - Specify if the use of server push is not desired
# for the script. Defaults to +true+.
#
# Any other specified options will be treated as HTML attributes for the
# +script+ tag.
#
# For more information regarding how the :async and :defer
# options affect the tag, please refer to the
# {MDN docs}[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script].
#
# ==== Examples
#
# javascript_include_tag "xmlhr"
# # =>
#
# javascript_include_tag "xmlhr", host: "localhost", protocol: "https"
# # =>
#
# javascript_include_tag "template.jst", extname: false
# # =>
#
# javascript_include_tag "xmlhr.js"
# # =>
#
# javascript_include_tag "common.javascript", "/elsewhere/cools"
# # =>
# #
#
# javascript_include_tag "http://www.example.com/xmlhr"
# # =>
#
# javascript_include_tag "http://www.example.com/xmlhr.js"
# # =>
#
# javascript_include_tag "http://www.example.com/xmlhr.js", nonce: true
# # =>
#
# javascript_include_tag "http://www.example.com/xmlhr.js", async: true
# # =>
#
# javascript_include_tag "http://www.example.com/xmlhr.js", defer: true
# # =>
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#113
def javascript_include_tag(*sources); end
# Returns an HTML picture tag for the +sources+. If +sources+ is a string,
# a single picture tag will be returned. If +sources+ is an array, a picture
# tag with nested source tags for each source will be returned. The
# +sources+ can be full paths, files that exist in your public images
# directory, or Active Storage attachments. Since the picture tag requires
# an img tag, the last element you provide will be used for the img tag.
# For complete control over the picture tag, a block can be passed, which
# will populate the contents of the tag accordingly.
#
# ==== Options
#
# When the last parameter is a hash you can add HTML attributes using that
# parameter. Apart from all the HTML supported options, the following are supported:
#
# * :image - Hash of options that are passed directly to the +image_tag+ helper.
#
# ==== Examples
#
# picture_tag("picture.webp")
# # =>
# picture_tag("gold.png", :image => { :size => "20" })
# # =>
# picture_tag("gold.png", :image => { :size => "45x70" })
# # =>
# picture_tag("picture.webp", "picture.png")
# # =>
# picture_tag("picture.webp", "picture.png", :image => { alt: "Image" })
# # =>
# picture_tag(["picture.webp", "picture.png"], :image => { alt: "Image" })
# # =>
# picture_tag(:class => "my-class") { tag(:source, :srcset => image_path("picture.webp")) + image_tag("picture.png", :alt => "Image") }
# # =>
# picture_tag { tag(:source, :srcset => image_path("picture-small.webp"), :media => "(min-width: 600px)") + tag(:source, :srcset => image_path("picture-big.webp")) + image_tag("picture.png", :alt => "Image") }
# # =>
#
# Active Storage blobs (images that are uploaded by the users of your app):
#
# picture_tag(user.profile_picture)
# # =>
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#491
def picture_tag(*sources, &block); end
# Returns a link tag that browsers can use to preload the +source+.
# The +source+ can be the path of a resource managed by asset pipeline,
# a full path, or an URI.
#
# ==== Options
#
# * :type - Override the auto-generated mime type, defaults to the mime type for +source+ extension.
# * :as - Override the auto-generated value for as attribute, calculated using +source+ extension and mime type.
# * :crossorigin - Specify the crossorigin attribute, required to load cross-origin resources.
# * :nopush - Specify if the use of server push is not desired for the resource. Defaults to +false+.
# * :integrity - Specify the integrity attribute.
#
# ==== Examples
#
# preload_link_tag("custom_theme.css")
# # =>
#
# preload_link_tag("/videos/video.webm")
# # =>
#
# preload_link_tag(post_path(format: :json), as: "fetch")
# # =>
#
# preload_link_tag("worker.js", as: "worker")
# # =>
#
# preload_link_tag("//example.com/font.woff2")
# # =>
#
# preload_link_tag("//example.com/font.woff2", crossorigin: "use-credentials")
# # =>
#
# preload_link_tag("/media/audio.ogg", nopush: true)
# # =>
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#355
def preload_link_tag(source, options = T.unsafe(nil)); end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27
def preload_links_header; end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27
def preload_links_header=(val); end
# Returns a stylesheet link tag for the sources specified as arguments.
#
# When passing paths, the .css extension is optional.
# If you don't specify an extension, .css will be appended automatically.
# If you do not want .css appended to the path,
# set extname: false in the options.
# You can modify the link attributes by passing a hash as the last argument.
#
# If the server supports HTTP Early Hints, \Rails will push a 103 Early
# Hints response that links to the assets.
#
# ==== Options
#
# * :extname - Append an extension to the generated URL unless the extension
# already exists. This only applies for relative URLs.
# * :protocol - Sets the protocol of the generated URL. This option only
# applies when a relative URL and +host+ options are provided.
# * :host - When a relative URL is provided the host is added to the
# that path.
# * :skip_pipeline - This option is used to bypass the asset pipeline
# when it is set to true.
# * :nonce - When set to true, adds an automatic nonce value if
# you have Content Security Policy enabled.
# * :nopush - Specify if the use of server push is not desired
# for the stylesheet. Defaults to +true+.
#
# ==== Examples
#
# stylesheet_link_tag "style"
# # =>
#
# stylesheet_link_tag "style.css"
# # =>
#
# stylesheet_link_tag "http://www.example.com/style.css"
# # =>
#
# stylesheet_link_tag "style.less", extname: false, skip_pipeline: true, rel: "stylesheet/less"
# # =>
#
# stylesheet_link_tag "style", media: "all"
# # =>
#
# stylesheet_link_tag "style", media: "print"
# # =>
#
# stylesheet_link_tag "random.styles", "/css/stylish"
# # =>
# #
#
# stylesheet_link_tag "style", nonce: true
# # =>
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#202
def stylesheet_link_tag(*sources); end
# Returns an HTML video tag for the +sources+. If +sources+ is a string,
# a single video tag will be returned. If +sources+ is an array, a video
# tag with nested source tags for each source will be returned. The
# +sources+ can be full paths, files that exist in your public videos
# directory, or Active Storage attachments.
#
# ==== Options
#
# When the last parameter is a hash you can add HTML attributes using that
# parameter. The following options are supported:
#
# * :poster - Set an image (like a screenshot) to be shown
# before the video loads. The path is calculated like the +src+ of +image_tag+.
# * :size - Supplied as "#{width}x#{height}" or "#{number}", so "30x45" becomes
# width="30" height="45", and "50" becomes width="50" height="50".
# :size will be ignored if the value is not in the correct format.
# * :poster_skip_pipeline will bypass the asset pipeline when using
# the :poster option instead using an asset in the public folder.
#
# ==== Examples
#
# video_tag("trailer")
# # =>
# video_tag("trailer.ogg")
# # =>
# video_tag("trailer.ogg", controls: true, preload: 'none')
# # =>
# video_tag("trailer.m4v", size: "16x10", poster: "screenshot.png")
# # =>
# video_tag("trailer.m4v", size: "16x10", poster: "screenshot.png", poster_skip_pipeline: true)
# # =>
# video_tag("/trailers/hd.avi", size: "16x16")
# # =>
# video_tag("/trailers/hd.avi", size: "16")
# # =>
# video_tag("/trailers/hd.avi", height: '32', width: '32')
# # =>
# video_tag("trailer.ogg", "trailer.flv")
# # =>
# video_tag(["trailer.ogg", "trailer.flv"])
# # =>
# video_tag(["trailer.ogg", "trailer.flv"], size: "160x120")
# # =>
#
# Active Storage blobs (videos that are uploaded by the users of your app):
#
# video_tag(user.intro_video)
# # =>
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#561
def video_tag(*sources); end
private
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#634
def check_for_image_tag_errors(options); end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#625
def extract_dimensions(size); end
# @yield [options]
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#598
def multiple_sources_tag_builder(type, sources); end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#615
def resolve_asset_source(asset_type, source, skip_pipeline); end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#640
def resolve_link_as(extname, mime_type); end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#654
def send_preload_links_header(preload_links, max_header_size: T.unsafe(nil)); end
class << self
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28
def apply_stylesheet_media_default; end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28
def apply_stylesheet_media_default=(val); end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26
def image_decoding; end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26
def image_decoding=(val); end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25
def image_loading; end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25
def image_loading=(val); end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27
def preload_links_header; end
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27
def preload_links_header=(val); end
end
end
# Some HTTP client and proxies have a 4kiB header limit, but more importantly
# including preload links has diminishing returns so it's best to not go overboard
#
# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#652
ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Integer)
# = Action View Asset URL \Helpers
#
# This module provides methods for generating asset paths and
# URLs.
#
# image_path("rails.png")
# # => "/assets/rails.png"
#
# image_url("rails.png")
# # => "http://www.example.com/assets/rails.png"
#
# === Using asset hosts
#
# By default, \Rails links to these assets on the current host in the public
# folder, but you can direct \Rails to link to assets from a dedicated asset
# server by setting ActionController::Base.asset_host in the application
# configuration, typically in config/environments/production.rb.
# For example, you'd define assets.example.com to be your asset
# host this way, inside the configure block of your environment-specific
# configuration files or config/application.rb:
#
# config.action_controller.asset_host = "assets.example.com"
#
# Helpers take that into account:
#
# image_tag("rails.png")
# # =>
# stylesheet_link_tag("application")
# # =>
#
# Browsers open a limited number of simultaneous connections to a single
# host. The exact number varies by browser and version. This limit may cause
# some asset downloads to wait for previous assets to finish before they can
# begin. You can use the %d wildcard in the +asset_host+ to
# distribute the requests over four hosts. For example,
# assets%d.example.com will spread the asset requests over
# "assets0.example.com", ..., "assets3.example.com".
#
# image_tag("rails.png")
# # =>
# stylesheet_link_tag("application")
# # =>
#
# This may improve the asset loading performance of your application.
# It is also possible the combination of additional connection overhead
# (DNS, SSL) and the overall browser connection limits may result in this
# solution being slower. You should be sure to measure your actual
# performance across targeted browsers both before and after this change.
#
# To implement the corresponding hosts you can either set up four actual
# hosts or use wildcard DNS to CNAME the wildcard to a single asset host.
# You can read more about setting up your DNS CNAME records from your ISP.
#
# Note: This is purely a browser performance optimization and is not meant
# for server load balancing. See https://www.die.net/musings/page_load_time/
# for background and https://www.browserscope.org/?category=network for
# connection limit data.
#
# Alternatively, you can exert more control over the asset host by setting
# +asset_host+ to a proc like this:
#
# ActionController::Base.asset_host = Proc.new { |source|
# "http://assets#{OpenSSL::Digest::SHA256.hexdigest(source).to_i(16) % 2 + 1}.example.com"
# }
# image_tag("rails.png")
# # =>
# stylesheet_link_tag("application")
# # =>
#
# The example above generates "http://assets1.example.com" and
# "http://assets2.example.com". This option is useful for example if
# you need fewer/more than four hosts, custom host names, etc.
#
# As you see the proc takes a +source+ parameter. That's a string with the
# absolute path of the asset, for example "/assets/rails.png".
#
# ActionController::Base.asset_host = Proc.new { |source|
# if source.end_with?('.css')
# "http://stylesheets.example.com"
# else
# "http://assets.example.com"
# end
# }
# image_tag("rails.png")
# # =>
# stylesheet_link_tag("application")
# # =>
#
# Alternatively you may ask for a second parameter +request+. That one is
# particularly useful for serving assets from an SSL-protected page. The
# example proc below disables asset hosting for HTTPS connections, while
# still sending assets for plain HTTP requests from asset hosts. If you don't
# have SSL certificates for each of the asset hosts this technique allows you
# to avoid warnings in the client about mixed media.
# Note that the +request+ parameter might not be supplied, e.g. when the assets
# are precompiled with the command bin/rails assets:precompile. Make sure to use a
# +Proc+ instead of a lambda, since a +Proc+ allows missing parameters and sets them
# to +nil+.
#
# config.action_controller.asset_host = Proc.new { |source, request|
# if request && request.ssl?
# "#{request.protocol}#{request.host_with_port}"
# else
# "#{request.protocol}assets.example.com"
# end
# }
#
# You can also implement a custom asset host object that responds to +call+
# and takes either one or two parameters just like the proc.
#
# config.action_controller.asset_host = AssetHostingWithMinimumSsl.new(
# "http://asset%d.example.com", "https://asset1.example.com"
# )
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#121
module ActionView::Helpers::AssetUrlHelper
# This is the entry point for all assets.
# When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the
# behavior is "enhanced". You can bypass the asset pipeline by passing in
# skip_pipeline: true to the options.
#
# All other asset *_path helpers delegate through this method.
#
# === With the asset pipeline
#
# All options passed to +asset_path+ will be passed to +compute_asset_path+
# which is implemented by asset pipeline gems.
#
# asset_path("application.js") # => "/assets/application-60aa4fdc5cea14baf5400fba1abf4f2a46a5166bad4772b1effe341570f07de9.js"
# asset_path('application.js', host: 'example.com') # => "//example.com/assets/application.js"
# asset_path("application.js", host: 'example.com', protocol: 'https') # => "https://example.com/assets/application.js"
#
# === Without the asset pipeline (skip_pipeline: true)
#
# Accepts a type option that can specify the asset's extension. No error
# checking is done to verify the source passed into +asset_path+ is valid
# and that the file exists on disk.
#
# asset_path("application.js", skip_pipeline: true) # => "application.js"
# asset_path("filedoesnotexist.png", skip_pipeline: true) # => "filedoesnotexist.png"
# asset_path("application", type: :javascript, skip_pipeline: true) # => "/javascripts/application.js"
# asset_path("application", type: :stylesheet, skip_pipeline: true) # => "/stylesheets/application.css"
#
# === Options applying to all assets
#
# Below lists scenarios that apply to +asset_path+ whether or not you're
# using the asset pipeline.
#
# - All fully qualified URLs are returned immediately. This bypasses the
# asset pipeline and all other behavior described.
#
# asset_path("http://www.example.com/js/xmlhr.js") # => "http://www.example.com/js/xmlhr.js"
#
# - All assets that begin with a forward slash are assumed to be full
# URLs and will not be expanded. This will bypass the asset pipeline.
#
# asset_path("/foo.png") # => "/foo.png"
#
# - All blank strings will be returned immediately. This bypasses the
# asset pipeline and all other behavior described.
#
# asset_path("") # => ""
#
# - If config.relative_url_root is specified, all assets will have that
# root prepended.
#
# Rails.application.config.relative_url_root = "bar"
# asset_path("foo.js", skip_pipeline: true) # => "bar/foo.js"
#
# - A different asset host can be specified via config.action_controller.asset_host
# this is commonly used in conjunction with a CDN.
#
# Rails.application.config.action_controller.asset_host = "assets.example.com"
# asset_path("foo.js", skip_pipeline: true) # => "http://assets.example.com/foo.js"
#
# - An extension name can be specified manually with extname.
#
# asset_path("foo", skip_pipeline: true, extname: ".js") # => "/foo.js"
# asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js"
#
# @raise [ArgumentError]
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#187
def asset_path(source, options = T.unsafe(nil)); end
# Computes the full URL to an asset in the public directory. This
# will use +asset_path+ internally, so most of their behaviors
# will be the same. If +:host+ options is set, it overwrites global
# +config.action_controller.asset_host+ setting.
#
# All other options provided are forwarded to +asset_path+ call.
#
# asset_url "application.js" # => http://example.com/assets/application.js
# asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/assets/application.js
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#231
def asset_url(source, options = T.unsafe(nil)); end
# Computes the path to an audio asset in the public audios directory.
# Full paths from the document root will be passed through.
# Used internally by +audio_tag+ to build the audio path.
#
# audio_path("horse") # => /audios/horse
# audio_path("horse.wav") # => /audios/horse.wav
# audio_path("sounds/horse.wav") # => /audios/sounds/horse.wav
# audio_path("/sounds/horse.wav") # => /sounds/horse.wav
# audio_path("http://www.example.com/sounds/horse.wav") # => http://www.example.com/sounds/horse.wav
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#430
def audio_path(source, options = T.unsafe(nil)); end
# Computes the full URL to an audio asset in the public audios directory.
# This will use +audio_path+ internally, so most of their behaviors will be the same.
# Since +audio_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# audio_url "horse.wav", host: "http://stage.example.com" # => http://stage.example.com/audios/horse.wav
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#442
def audio_url(source, options = T.unsafe(nil)); end
# Compute extname to append to asset path. Returns +nil+ if
# nothing should be added.
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#243
def compute_asset_extname(source, options = T.unsafe(nil)); end
# Pick an asset host for this source. Returns +nil+ if no host is set,
# the host if no wildcard is set, the host interpolated with the
# numbers 0-3 if it contains %d (the number is the source hash mod 4),
# or the value returned from invoking call on an object responding to call
# (proc or otherwise).
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#277
def compute_asset_host(source = T.unsafe(nil), options = T.unsafe(nil)); end
# Computes asset path to public directory. Plugins and
# extensions can override this method to point to custom assets
# or generate digested paths or query strings.
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#266
def compute_asset_path(source, options = T.unsafe(nil)); end
# Computes the path to a font asset.
# Full paths from the document root will be passed through.
#
# font_path("font") # => /fonts/font
# font_path("font.ttf") # => /fonts/font.ttf
# font_path("dir/font.ttf") # => /fonts/dir/font.ttf
# font_path("/dir/font.ttf") # => /dir/font.ttf
# font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#455
def font_path(source, options = T.unsafe(nil)); end
# Computes the full URL to a font asset.
# This will use +font_path+ internally, so most of their behaviors will be the same.
# Since +font_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#467
def font_url(source, options = T.unsafe(nil)); end
# Computes the path to an image asset.
# Full paths from the document root will be passed through.
# Used internally by +image_tag+ to build the image path:
#
# image_path("edit") # => "/assets/edit"
# image_path("edit.png") # => "/assets/edit.png"
# image_path("icons/edit.png") # => "/assets/icons/edit.png"
# image_path("/icons/edit.png") # => "/icons/edit.png"
# image_path("http://www.example.com/img/edit.png") # => "http://www.example.com/img/edit.png"
#
# If you have images as application resources this method may conflict with their named routes.
# The alias +path_to_image+ is provided to avoid that. \Rails uses the alias internally, and
# plugin authors are encouraged to do so.
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#378
def image_path(source, options = T.unsafe(nil)); end
# Computes the full URL to an image asset.
# This will use +image_path+ internally, so most of their behaviors will be the same.
# Since +image_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# image_url "edit.png", host: "http://stage.example.com" # => http://stage.example.com/assets/edit.png
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#390
def image_url(source, options = T.unsafe(nil)); end
# Computes the path to a JavaScript asset in the public javascripts directory.
# If the +source+ filename has no extension, .js will be appended (except for explicit URIs)
# Full paths from the document root will be passed through.
# Used internally by +javascript_include_tag+ to build the script path.
#
# javascript_path "xmlhr" # => /assets/xmlhr.js
# javascript_path "dir/xmlhr.js" # => /assets/dir/xmlhr.js
# javascript_path "/dir/xmlhr" # => /dir/xmlhr.js
# javascript_path "http://www.example.com/js/xmlhr" # => http://www.example.com/js/xmlhr
# javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#321
def javascript_path(source, options = T.unsafe(nil)); end
# Computes the full URL to a JavaScript asset in the public javascripts directory.
# This will use +javascript_path+ internally, so most of their behaviors will be the same.
# Since +javascript_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# javascript_url "js/xmlhr.js", host: "http://stage.example.com" # => http://stage.example.com/assets/js/xmlhr.js
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#333
def javascript_url(source, options = T.unsafe(nil)); end
# This is the entry point for all assets.
# When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the
# behavior is "enhanced". You can bypass the asset pipeline by passing in
# skip_pipeline: true to the options.
#
# All other asset *_path helpers delegate through this method.
#
# === With the asset pipeline
#
# All options passed to +asset_path+ will be passed to +compute_asset_path+
# which is implemented by asset pipeline gems.
#
# asset_path("application.js") # => "/assets/application-60aa4fdc5cea14baf5400fba1abf4f2a46a5166bad4772b1effe341570f07de9.js"
# asset_path('application.js', host: 'example.com') # => "//example.com/assets/application.js"
# asset_path("application.js", host: 'example.com', protocol: 'https') # => "https://example.com/assets/application.js"
#
# === Without the asset pipeline (skip_pipeline: true)
#
# Accepts a type option that can specify the asset's extension. No error
# checking is done to verify the source passed into +asset_path+ is valid
# and that the file exists on disk.
#
# asset_path("application.js", skip_pipeline: true) # => "application.js"
# asset_path("filedoesnotexist.png", skip_pipeline: true) # => "filedoesnotexist.png"
# asset_path("application", type: :javascript, skip_pipeline: true) # => "/javascripts/application.js"
# asset_path("application", type: :stylesheet, skip_pipeline: true) # => "/stylesheets/application.css"
#
# === Options applying to all assets
#
# Below lists scenarios that apply to +asset_path+ whether or not you're
# using the asset pipeline.
#
# - All fully qualified URLs are returned immediately. This bypasses the
# asset pipeline and all other behavior described.
#
# asset_path("http://www.example.com/js/xmlhr.js") # => "http://www.example.com/js/xmlhr.js"
#
# - All assets that begin with a forward slash are assumed to be full
# URLs and will not be expanded. This will bypass the asset pipeline.
#
# asset_path("/foo.png") # => "/foo.png"
#
# - All blank strings will be returned immediately. This bypasses the
# asset pipeline and all other behavior described.
#
# asset_path("") # => ""
#
# - If config.relative_url_root is specified, all assets will have that
# root prepended.
#
# Rails.application.config.relative_url_root = "bar"
# asset_path("foo.js", skip_pipeline: true) # => "bar/foo.js"
#
# - A different asset host can be specified via config.action_controller.asset_host
# this is commonly used in conjunction with a CDN.
#
# Rails.application.config.action_controller.asset_host = "assets.example.com"
# asset_path("foo.js", skip_pipeline: true) # => "http://assets.example.com/foo.js"
#
# - An extension name can be specified manually with extname.
#
# asset_path("foo", skip_pipeline: true, extname: ".js") # => "/foo.js"
# asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js"
# aliased to avoid conflicts with an asset_path named route
#
# @raise [ArgumentError]
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#187
def path_to_asset(source, options = T.unsafe(nil)); end
# Computes the path to an audio asset in the public audios directory.
# Full paths from the document root will be passed through.
# Used internally by +audio_tag+ to build the audio path.
#
# audio_path("horse") # => /audios/horse
# audio_path("horse.wav") # => /audios/horse.wav
# audio_path("sounds/horse.wav") # => /audios/sounds/horse.wav
# audio_path("/sounds/horse.wav") # => /sounds/horse.wav
# audio_path("http://www.example.com/sounds/horse.wav") # => http://www.example.com/sounds/horse.wav
# aliased to avoid conflicts with an audio_path named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#430
def path_to_audio(source, options = T.unsafe(nil)); end
# Computes the path to a font asset.
# Full paths from the document root will be passed through.
#
# font_path("font") # => /fonts/font
# font_path("font.ttf") # => /fonts/font.ttf
# font_path("dir/font.ttf") # => /fonts/dir/font.ttf
# font_path("/dir/font.ttf") # => /dir/font.ttf
# font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf
# aliased to avoid conflicts with a font_path named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#455
def path_to_font(source, options = T.unsafe(nil)); end
# Computes the path to an image asset.
# Full paths from the document root will be passed through.
# Used internally by +image_tag+ to build the image path:
#
# image_path("edit") # => "/assets/edit"
# image_path("edit.png") # => "/assets/edit.png"
# image_path("icons/edit.png") # => "/assets/icons/edit.png"
# image_path("/icons/edit.png") # => "/icons/edit.png"
# image_path("http://www.example.com/img/edit.png") # => "http://www.example.com/img/edit.png"
#
# If you have images as application resources this method may conflict with their named routes.
# The alias +path_to_image+ is provided to avoid that. \Rails uses the alias internally, and
# plugin authors are encouraged to do so.
# aliased to avoid conflicts with an image_path named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#378
def path_to_image(source, options = T.unsafe(nil)); end
# Computes the path to a JavaScript asset in the public javascripts directory.
# If the +source+ filename has no extension, .js will be appended (except for explicit URIs)
# Full paths from the document root will be passed through.
# Used internally by +javascript_include_tag+ to build the script path.
#
# javascript_path "xmlhr" # => /assets/xmlhr.js
# javascript_path "dir/xmlhr.js" # => /assets/dir/xmlhr.js
# javascript_path "/dir/xmlhr" # => /dir/xmlhr.js
# javascript_path "http://www.example.com/js/xmlhr" # => http://www.example.com/js/xmlhr
# javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js
# aliased to avoid conflicts with a javascript_path named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#321
def path_to_javascript(source, options = T.unsafe(nil)); end
# Computes the path to a stylesheet asset in the public stylesheets directory.
# If the +source+ filename has no extension, .css will be appended (except for explicit URIs).
# Full paths from the document root will be passed through.
# Used internally by +stylesheet_link_tag+ to build the stylesheet path.
#
# stylesheet_path "style" # => /assets/style.css
# stylesheet_path "dir/style.css" # => /assets/dir/style.css
# stylesheet_path "/dir/style.css" # => /dir/style.css
# stylesheet_path "http://www.example.com/css/style" # => http://www.example.com/css/style
# stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css
# aliased to avoid conflicts with a stylesheet_path named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#348
def path_to_stylesheet(source, options = T.unsafe(nil)); end
# Computes the path to a video asset in the public videos directory.
# Full paths from the document root will be passed through.
# Used internally by +video_tag+ to build the video path.
#
# video_path("hd") # => /videos/hd
# video_path("hd.avi") # => /videos/hd.avi
# video_path("trailers/hd.avi") # => /videos/trailers/hd.avi
# video_path("/trailers/hd.avi") # => /trailers/hd.avi
# video_path("http://www.example.com/vid/hd.avi") # => http://www.example.com/vid/hd.avi
# aliased to avoid conflicts with a video_path named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#404
def path_to_video(source, options = T.unsafe(nil)); end
# Computes asset path to public directory. Plugins and
# extensions can override this method to point to custom assets
# or generate digested paths or query strings.
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#266
def public_compute_asset_path(source, options = T.unsafe(nil)); end
# Computes the path to a stylesheet asset in the public stylesheets directory.
# If the +source+ filename has no extension, .css will be appended (except for explicit URIs).
# Full paths from the document root will be passed through.
# Used internally by +stylesheet_link_tag+ to build the stylesheet path.
#
# stylesheet_path "style" # => /assets/style.css
# stylesheet_path "dir/style.css" # => /assets/dir/style.css
# stylesheet_path "/dir/style.css" # => /dir/style.css
# stylesheet_path "http://www.example.com/css/style" # => http://www.example.com/css/style
# stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#348
def stylesheet_path(source, options = T.unsafe(nil)); end
# Computes the full URL to a stylesheet asset in the public stylesheets directory.
# This will use +stylesheet_path+ internally, so most of their behaviors will be the same.
# Since +stylesheet_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# stylesheet_url "css/style.css", host: "http://stage.example.com" # => http://stage.example.com/assets/css/style.css
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#360
def stylesheet_url(source, options = T.unsafe(nil)); end
# Computes the full URL to an asset in the public directory. This
# will use +asset_path+ internally, so most of their behaviors
# will be the same. If +:host+ options is set, it overwrites global
# +config.action_controller.asset_host+ setting.
#
# All other options provided are forwarded to +asset_path+ call.
#
# asset_url "application.js" # => http://example.com/assets/application.js
# asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/assets/application.js
# aliased to avoid conflicts with an asset_url named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#231
def url_to_asset(source, options = T.unsafe(nil)); end
# Computes the full URL to an audio asset in the public audios directory.
# This will use +audio_path+ internally, so most of their behaviors will be the same.
# Since +audio_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# audio_url "horse.wav", host: "http://stage.example.com" # => http://stage.example.com/audios/horse.wav
# aliased to avoid conflicts with an audio_url named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#442
def url_to_audio(source, options = T.unsafe(nil)); end
# Computes the full URL to a font asset.
# This will use +font_path+ internally, so most of their behaviors will be the same.
# Since +font_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf
# aliased to avoid conflicts with a font_url named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#467
def url_to_font(source, options = T.unsafe(nil)); end
# Computes the full URL to an image asset.
# This will use +image_path+ internally, so most of their behaviors will be the same.
# Since +image_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# image_url "edit.png", host: "http://stage.example.com" # => http://stage.example.com/assets/edit.png
# aliased to avoid conflicts with an image_url named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#390
def url_to_image(source, options = T.unsafe(nil)); end
# Computes the full URL to a JavaScript asset in the public javascripts directory.
# This will use +javascript_path+ internally, so most of their behaviors will be the same.
# Since +javascript_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# javascript_url "js/xmlhr.js", host: "http://stage.example.com" # => http://stage.example.com/assets/js/xmlhr.js
# aliased to avoid conflicts with a javascript_url named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#333
def url_to_javascript(source, options = T.unsafe(nil)); end
# Computes the full URL to a stylesheet asset in the public stylesheets directory.
# This will use +stylesheet_path+ internally, so most of their behaviors will be the same.
# Since +stylesheet_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# stylesheet_url "css/style.css", host: "http://stage.example.com" # => http://stage.example.com/assets/css/style.css
# aliased to avoid conflicts with a stylesheet_url named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#360
def url_to_stylesheet(source, options = T.unsafe(nil)); end
# Computes the full URL to a video asset in the public videos directory.
# This will use +video_path+ internally, so most of their behaviors will be the same.
# Since +video_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# video_url "hd.avi", host: "http://stage.example.com" # => http://stage.example.com/videos/hd.avi
# aliased to avoid conflicts with a video_url named route
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#416
def url_to_video(source, options = T.unsafe(nil)); end
# Computes the path to a video asset in the public videos directory.
# Full paths from the document root will be passed through.
# Used internally by +video_tag+ to build the video path.
#
# video_path("hd") # => /videos/hd
# video_path("hd.avi") # => /videos/hd.avi
# video_path("trailers/hd.avi") # => /videos/trailers/hd.avi
# video_path("/trailers/hd.avi") # => /trailers/hd.avi
# video_path("http://www.example.com/vid/hd.avi") # => http://www.example.com/vid/hd.avi
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#404
def video_path(source, options = T.unsafe(nil)); end
# Computes the full URL to a video asset in the public videos directory.
# This will use +video_path+ internally, so most of their behaviors will be the same.
# Since +video_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+
# options is set, it overwrites global +config.action_controller.asset_host+ setting.
#
# video_url "hd.avi", host: "http://stage.example.com" # => http://stage.example.com/videos/hd.avi
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#416
def video_url(source, options = T.unsafe(nil)); end
end
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#236
ActionView::Helpers::AssetUrlHelper::ASSET_EXTENSIONS = T.let(T.unsafe(nil), Hash)
# Maps asset types to public directory.
#
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#254
ActionView::Helpers::AssetUrlHelper::ASSET_PUBLIC_DIRECTORIES = T.let(T.unsafe(nil), Hash)
# source://actionview//lib/action_view/helpers/asset_url_helper.rb#122
ActionView::Helpers::AssetUrlHelper::URI_REGEXP = T.let(T.unsafe(nil), Regexp)
# = Action View Atom Feed \Helpers
#
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#6
module ActionView::Helpers::AtomFeedHelper
# Adds easy defaults to writing Atom feeds with the Builder template engine (this does not work on ERB or any other
# template languages).
#
# Full usage example:
#
# config/routes.rb:
# Rails.application.routes.draw do
# resources :posts
# root to: "posts#index"
# end
#
# app/controllers/posts_controller.rb:
# class PostsController < ApplicationController
# # GET /posts.html
# # GET /posts.atom
# def index
# @posts = Post.all
#
# respond_to do |format|
# format.html
# format.atom
# end
# end
# end
#
# app/views/posts/index.atom.builder:
# atom_feed do |feed|
# feed.title("My great blog!")
# feed.updated(@posts[0].created_at) if @posts.length > 0
#
# @posts.each do |post|
# feed.entry(post) do |entry|
# entry.title(post.title)
# entry.content(post.body, type: 'html')
#
# entry.author do |author|
# author.name("DHH")
# end
# end
# end
# end
#
# The options for atom_feed are:
#
# * :language: Defaults to "en-US".
# * :root_url: The HTML alternative that this feed is doubling for. Defaults to / on the current host.
# * :url: The URL for this feed. Defaults to the current URL.
# * :id: The id for this feed. Defaults to "tag:localhost,2005:/posts", in this case.
# * :schema_date: The date at which the tag scheme for the feed was first used. A good default is the year you
# created the feed. See http://feedvalidator.org/docs/error/InvalidTAG.html for more information. If not specified,
# 2005 is used (as an "I don't care" value).
# * :instruct: Hash of XML processing instructions in the form {target => {attribute => value, }} or {target => [{attribute => value, }, ]}
#
# Other namespaces can be added to the root element:
#
# app/views/posts/index.atom.builder:
# atom_feed({'xmlns:app' => 'http://www.w3.org/2007/app',
# 'xmlns:openSearch' => 'http://a9.com/-/spec/opensearch/1.1/'}) do |feed|
# feed.title("My great blog!")
# feed.updated((@posts.first.created_at))
# feed.tag!('openSearch:totalResults', 10)
#
# @posts.each do |post|
# feed.entry(post) do |entry|
# entry.title(post.title)
# entry.content(post.body, type: 'html')
# entry.tag!('app:edited', Time.now)
#
# entry.author do |author|
# author.name("DHH")
# end
# end
# end
# end
#
# The Atom spec defines five elements (content rights title subtitle
# summary) which may directly contain XHTML content if type: 'xhtml'
# is specified as an attribute. If so, this helper will take care of
# the enclosing div and XHTML namespace declaration. Example usage:
#
# entry.summary type: 'xhtml' do |xhtml|
# xhtml.p pluralize(order.line_items.count, "line item")
# xhtml.p "Shipped to #{order.address}"
# xhtml.p "Paid by #{order.pay_type}"
# end
#
#
# atom_feed yields an +AtomFeedBuilder+ instance. Nested elements yield
# an +AtomBuilder+ instance.
#
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#96
def atom_feed(options = T.unsafe(nil), &block); end
end
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#127
class ActionView::Helpers::AtomFeedHelper::AtomBuilder
# @return [AtomBuilder] a new instance of AtomBuilder
#
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#130
def initialize(xml); end
private
# Delegate to XML Builder, first wrapping the element in an XHTML
# namespaced div element if the method and arguments indicate
# that an xhtml_block? is desired.
#
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#138
def method_missing(method, *arguments, &block); end
# True if the method name matches one of the five elements defined
# in the Atom spec as potentially containing XHTML content and
# if type: 'xhtml' is, in fact, specified.
#
# @return [Boolean]
#
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#153
def xhtml_block?(method, arguments); end
end
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#128
ActionView::Helpers::AtomFeedHelper::AtomBuilder::XHTML_TAG_NAMES = T.let(T.unsafe(nil), Set)
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#161
class ActionView::Helpers::AtomFeedHelper::AtomFeedBuilder < ::ActionView::Helpers::AtomFeedHelper::AtomBuilder
# @return [AtomFeedBuilder] a new instance of AtomFeedBuilder
#
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#162
def initialize(xml, view, feed_options = T.unsafe(nil)); end
# Creates an entry tag for a specific record and prefills the id using class and id.
#
# Options:
#
# * :published: Time first published. Defaults to the created_at attribute on the record if one such exists.
# * :updated: Time of update. Defaults to the updated_at attribute on the record if one such exists.
# * :url: The URL for this entry or +false+ or +nil+ for not having a link tag. Defaults to the +polymorphic_url+ for the record.
# * :id: The ID for this entry. Defaults to "tag:#{@view.request.host},#{@feed_options[:schema_date]}:#{record.class}/#{record.id}"
# * :type: The TYPE for this entry. Defaults to "text/html".
#
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#180
def entry(record, options = T.unsafe(nil)); end
# Accepts a Date or Time object and inserts it in the proper format. If +nil+ is passed, current time in UTC is used.
#
# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#167
def updated(date_or_time = T.unsafe(nil)); end
end
# = Action View Cache \Helpers
#
# source://actionview//lib/action_view/helpers/cache_helper.rb#6
module ActionView::Helpers::CacheHelper
# This helper exposes a method for caching fragments of a view
# rather than an entire action or page. This technique is useful
# caching pieces like menus, lists of new topics, static HTML
# fragments, and so on. This method takes a block that contains
# the content you wish to cache.
#
# The best way to use this is by doing recyclable key-based cache expiration
# on top of a cache store like Memcached or Redis that'll automatically
# kick out old entries.
#
# When using this method, you list the cache dependency as the name of the cache, like so:
#
# <% cache project do %>
# All the topics on this project
# <%= render project.topics %>
# <% end %>
#
# This approach will assume that when a new topic is added, you'll touch
# the project. The cache key generated from this call will be something like:
#
# views/template/action:7a1156131a6928cb0026877f8b749ac9/projects/123
# ^template path ^template tree digest ^class ^id
#
# This cache key is stable, but it's combined with a cache version derived from the project
# record. When the project updated_at is touched, the #cache_version changes, even
# if the key stays stable. This means that unlike a traditional key-based cache expiration
# approach, you won't be generating cache trash, unused keys, simply because the dependent
# record is updated.
#
# If your template cache depends on multiple sources (try to avoid this to keep things simple),
# you can name all these dependencies as part of an array:
#
# <% cache [ project, current_user ] do %>
# All the topics on this project
# <%= render project.topics %>
# <% end %>
#
# This will include both records as part of the cache key and updating either of them will
# expire the cache.
#
# ==== \Template digest
#
# The template digest that's added to the cache key is computed by taking an MD5 of the
# contents of the entire template file. This ensures that your caches will automatically
# expire when you change the template file.
#
# Note that the MD5 is taken of the entire template file, not just what's within the
# cache do/end call. So it's possible that changing something outside of that call will
# still expire the cache.
#
# Additionally, the digestor will automatically look through your template file for
# explicit and implicit dependencies, and include those as part of the digest.
#
# The digestor can be bypassed by passing skip_digest: true as an option to the cache call:
#
# <% cache project, skip_digest: true do %>
# All the topics on this project
# <%= render project.topics %>
# <% end %>
#
# ==== Implicit dependencies
#
# Most template dependencies can be derived from calls to render in the template itself.
# Here are some examples of render calls that Cache Digests knows how to decode:
#
# render partial: "comments/comment", collection: commentable.comments
# render "comments/comments"
# render 'comments/comments'
# render('comments/comments')
#
# render "header" # translates to render("comments/header")
#
# render(@topic) # translates to render("topics/topic")
# render(topics) # translates to render("topics/topic")
# render(message.topics) # translates to render("topics/topic")
#
# It's not possible to derive all render calls like that, though.
# Here are a few examples of things that can't be derived:
#
# render group_of_attachments
# render @project.documents.where(published: true).order('created_at')
#
# You will have to rewrite those to the explicit form:
#
# render partial: 'attachments/attachment', collection: group_of_attachments
# render partial: 'documents/document', collection: @project.documents.where(published: true).order('created_at')
#
# One last type of dependency can be determined implicitly:
#
# render "maintenance_tasks/runs/info/#{run.status}"
#
# Because the value passed to render ends in interpolation, Action View
# will mark all partials within the "maintenance_tasks/runs/info" folder as
# dependencies.
#
# === Explicit dependencies
#
# Sometimes you'll have template dependencies that can't be derived at all. This is typically
# the case when you have template rendering that happens in helpers. Here's an example:
#
# <%= render_sortable_todolists @project.todolists %>
#
# You'll need to use a special comment format to call those out:
#
# <%# Template Dependency: todolists/todolist %>
# <%= render_sortable_todolists @project.todolists %>
#
# In some cases, like a single table inheritance setup, you might have
# a bunch of explicit dependencies. Instead of writing every template out,
# you can use a wildcard to match any template in a directory:
#
# <%# Template Dependency: events/* %>
# <%= render_categorizable_events @person.events %>
#
# This marks every template in the directory as a dependency. To find those
# templates, the wildcard path must be absolutely defined from app/views or paths
# otherwise added with +prepend_view_path+ or +append_view_path+.
# This way the wildcard for app/views/recordings/events would be recordings/events/* etc.
#
# The pattern used to match explicit dependencies is /# Template Dependency: (\S+)/,
# so it's important that you type it out just so.
# You can only declare one template dependency per line.
#
# === External dependencies
#
# If you use a helper method, for example, inside a cached block and
# you then update that helper, you'll have to bump the cache as well.
# It doesn't really matter how you do it, but the MD5 of the template file
# must change. One recommendation is to simply be explicit in a comment, like:
#
# <%# Helper Dependency Updated: May 6, 2012 at 6pm %>
# <%= some_helper_method(person) %>
#
# Now all you have to do is change that timestamp when the helper method changes.
#
# === Collection Caching
#
# When rendering a collection of objects that each use the same partial, a :cached
# option can be passed.
#
# For collections rendered such:
#
# <%= render partial: 'projects/project', collection: @projects, cached: true %>
#
# The cached: true will make Action View's rendering read several templates
# from cache at once instead of one call per template.
#
# Templates in the collection not already cached are written to cache.
#
# Works great alongside individual template fragment caching.
# For instance if the template the collection renders is cached like:
#
# # projects/_project.html.erb
# <% cache project do %>
# <%# ... %>
# <% end %>
#
# Any collection renders will find those cached templates when attempting
# to read multiple templates at once.
#
# If your collection cache depends on multiple sources (try to avoid this to keep things simple),
# you can name all these dependencies as part of a block that returns an array:
#
# <%= render partial: 'projects/project', collection: @projects, cached: -> project { [ project, current_user ] } %>
#
# This will include both records as part of the cache key and updating either of them will
# expire the cache.
#
# source://actionview//lib/action_view/helpers/cache_helper.rb#176
def cache(name = T.unsafe(nil), options = T.unsafe(nil), &block); end
# This helper returns the name of a cache key for a given fragment cache
# call. By supplying skip_digest: true to cache, the digestion of cache
# fragments can be manually bypassed. This is useful when cache fragments
# cannot be manually expired unless you know the exact key which is the
# case when using memcached.
#
# source://actionview//lib/action_view/helpers/cache_helper.rb#248
def cache_fragment_name(name = T.unsafe(nil), skip_digest: T.unsafe(nil), digest_path: T.unsafe(nil)); end
# Cache fragments of a view if +condition+ is true
#
# <% cache_if admin?, project do %>
# All the topics on this project
# <%= render project.topics %>
# <% end %>
#
# source://actionview//lib/action_view/helpers/cache_helper.rb#223
def cache_if(condition, name = T.unsafe(nil), options = T.unsafe(nil), &block); end
# Cache fragments of a view unless +condition+ is true
#
# <% cache_unless admin?, project do %>
# All the topics on this project
# <%= render project.topics %>
# <% end %>
#
# source://actionview//lib/action_view/helpers/cache_helper.rb#239
def cache_unless(condition, name = T.unsafe(nil), options = T.unsafe(nil), &block); end
# Returns whether the current view fragment is within a +cache+ block.
#
# Useful when certain fragments aren't cacheable:
#
# <% cache project do %>
# <% raise StandardError, "Caching private data!" if caching? %>
# <% end %>
#
# @return [Boolean]
#
# source://actionview//lib/action_view/helpers/cache_helper.rb#196
def caching?; end
# source://actionview//lib/action_view/helpers/cache_helper.rb#256
def digest_path_from_template(template); end
# Raises +UncacheableFragmentError+ when called from within a +cache+ block.
#
# Useful to denote helper methods that can't participate in fragment caching:
#
# def project_name_with_time(project)
# uncacheable!
# "#{project.name} - #{Time.now}"
# end
#
# # Which will then raise if used within a +cache+ block:
# <% cache project do %>
# <%= project_name_with_time(project) %>
# <% end %>
#
# @raise [UncacheableFragmentError]
#
# source://actionview//lib/action_view/helpers/cache_helper.rb#213
def uncacheable!; end
private
# source://actionview//lib/action_view/helpers/cache_helper.rb#278
def fragment_for(name = T.unsafe(nil), options = T.unsafe(nil), &block); end
# source://actionview//lib/action_view/helpers/cache_helper.rb#267
def fragment_name_with_digest(name, digest_path); end
# source://actionview//lib/action_view/helpers/cache_helper.rb#288
def read_fragment_for(name, options); end
# source://actionview//lib/action_view/helpers/cache_helper.rb#292
def write_fragment_for(name, options, &block); end
end
# source://actionview//lib/action_view/helpers/cache_helper.rb#297
module ActionView::Helpers::CacheHelper::CachingRegistry
extend ::ActionView::Helpers::CacheHelper::CachingRegistry
# @return [Boolean]
#
# source://actionview//lib/action_view/helpers/cache_helper.rb#300
def caching?; end
# source://actionview//lib/action_view/helpers/cache_helper.rb#304
def track_caching; end
end
# source://actionview//lib/action_view/helpers/cache_helper.rb#7
class ActionView::Helpers::CacheHelper::UncacheableFragmentError < ::StandardError; end
# = Action View Capture \Helpers
#
# \CaptureHelper exposes methods to let you extract generated markup which
# can be used in other parts of a template or layout file.
#
# It provides a method to capture blocks into variables through #capture and
# a way to capture a block of markup for use in a layout through #content_for.
#
# As well as provides a method when using streaming responses through #provide.
# See ActionController::Streaming for more information.
#
# source://actionview//lib/action_view/helpers/capture_helper.rb#17
module ActionView::Helpers::CaptureHelper
# The capture method extracts part of a template as a string object.
# You can then use this object anywhere in your templates, layout, or helpers.
#
# The capture method can be used in \ERB templates...
#
# <% @greeting = capture do %>
# Welcome to my shiny new web page! The date and time is
# <%= Time.now %>
# <% end %>
#
# ...and Builder (RXML) templates.
#
# @timestamp = capture do
# "The current timestamp is #{Time.now}."
# end
#
# You can then use that variable anywhere else. For example:
#
#
# <%= @greeting %>
#
# <%= @greeting %>
#
#
#
# The return of capture is the string generated by the block. For Example:
#
# @greeting # => "Welcome to my shiny new web page! The date and time is 2018-09-06 11:09:16 -0500"
#
# source://actionview//lib/action_view/helpers/capture_helper.rb#47
def capture(*args, &block); end
# Calling content_for stores a block of markup in an identifier for later use.
# In order to access this stored content in other templates, helper modules
# or the layout, you would pass the identifier as an argument to content_for.
#
# Note: yield can still be used to retrieve the stored content, but calling
# yield doesn't work in helper modules, while content_for does.
#
# <% content_for :not_authorized do %>
# alert('You are not authorized to do that!')
# <% end %>
#
# You can then use content_for :not_authorized anywhere in your templates.
#
# <%= content_for :not_authorized if current_user.nil? %>
#
# This is equivalent to:
#
# <%= yield :not_authorized if current_user.nil? %>
#
# content_for, however, can also be used in helper modules.
#
# module StorageHelper
# def stored_content
# content_for(:storage) || "Your storage is empty"
# end
# end
#
# This helper works just like normal helpers.
#
# <%= stored_content %>
#
# You can also use the yield syntax alongside an existing call to
# yield in a layout. For example:
#
# <%# This is the layout %>
#
#
# My Website
# <%= yield :script %>
#
#
# <%= yield %>
#
#
#
# And now, we'll create a view that has a content_for call that
# creates the script identifier.
#
# <%# This is our view %>
# Please login!
#
# <% content_for :script do %>
#
# <% end %>
#
# Then, in another view, you could to do something like this:
#
# <%= link_to 'Logout', action: 'logout', remote: true %>
#
# <% content_for :script do %>
# <%= javascript_include_tag :defaults %>
# <% end %>
#
# That will place +script+ tags for your default set of JavaScript files on the page;
# this technique is useful if you'll only be using these scripts in a few views.
#
# Note that content_for concatenates (default) the blocks it is given for a particular
# identifier in order. For example:
#
# <% content_for :navigation do %>
#
<%= link_to 'Home', action: 'index' %>
# <% end %>
#
# And in another place:
#
# <% content_for :navigation do %>
#
<%= link_to 'Login', action: 'login' %>
# <% end %>
#
# Then, in another template or layout, this code would render both links in order:
#
#
<%= content_for :navigation %>
#
# If the flush parameter is +true+ content_for replaces the blocks it is given. For example:
#
# <% content_for :navigation do %>
#
<%= link_to 'Home', action: 'index' %>
# <% end %>
#
# <%# Add some other content, or use a different template: %>
#
# <% content_for :navigation, flush: true do %>
#
<%= link_to 'Login', action: 'login' %>
# <% end %>
#
# Then, in another template or layout, this code would render only the last link:
#
#
<%= content_for :navigation %>
#
# Lastly, simple content can be passed as a parameter:
#
# <% content_for :script, javascript_include_tag(:defaults) %>
#
# WARNING: content_for is ignored in caches. So you shouldn't use it for elements that will be fragment cached.
#
# source://actionview//lib/action_view/helpers/capture_helper.rb#172
def content_for(name, content = T.unsafe(nil), options = T.unsafe(nil), &block); end
# content_for? checks whether any content has been captured yet using content_for.
#
# Useful to render parts of your layout differently based on what is in your views.
#
# <%# This is the layout %>
#
#
# My Website
# <%= yield :script %>
#
#
# <%= yield %>
# <%= yield :right_col %>
#
#
#
# @return [Boolean]
#
# source://actionview//lib/action_view/helpers/capture_helper.rb#215
def content_for?(name); end
# The same as +content_for+ but when used with streaming flushes
# straight back to the layout. In other words, if you want to
# concatenate several times to the same buffer when rendering a given
# template, you should use +content_for+, if not, use +provide+ to tell
# the layout to stop looking for more contents.
#
# See ActionController::Streaming for more information.
#
# source://actionview//lib/action_view/helpers/capture_helper.rb#194
def provide(name, content = T.unsafe(nil), &block); end
# Use an alternate output buffer for the duration of the block.
# Defaults to a new empty string.
#
# source://actionview//lib/action_view/helpers/capture_helper.rb#221
def with_output_buffer(buf = T.unsafe(nil)); end
end
# source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#5
module ActionView::Helpers::ContentExfiltrationPreventionHelper
# source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6
def prepend_content_exfiltration_prevention; end
# source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6
def prepend_content_exfiltration_prevention=(val); end
# source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#61
def prevent_content_exfiltration(html); end
class << self
# source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6
def prepend_content_exfiltration_prevention; end
# source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6
def prepend_content_exfiltration_prevention=(val); end
end
end
# Close any open tags that support CDATA (textarea, xmp) before each form tag.
# This prevents attackers from injecting unclosed tags that could capture
# form contents.
#
# For example, an attacker might inject:
#
#
# would be captured by the attacker's . By closing any open
# form tags, we ensure that form contents are never exfiltrated.
#
# source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#57
ActionView::Helpers::ContentExfiltrationPreventionHelper::CLOSE_FORM_TAG = T.let(T.unsafe(nil), ActiveSupport::SafeBuffer)
# Close any open option tags before each form tag. This prevents attackers
# from injecting unclosed options that could leak markup offsite.
#
# For example, an attacker might inject:
#
#