# 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") # # => 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 # # 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" }) # # => Image # picture_tag(["picture.webp", "picture.png"], :image => { alt: "Image" }) # # => Image # picture_tag(:class => "my-class") { tag(:source, :srcset => image_path("picture.webp")) + image_tag("picture.png", :alt => "Image") } # # => 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") } # # => 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: # # # # 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: # # # # 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: # #
    or # the end of the document would be captured by the attacker's # # # textarea(:comment, :text, size: "20x30") # # => # # textarea(:application, :notes, cols: 40, rows: 15, class: 'app_input') # # => # # textarea(:entry, :body, size: "20x20", disabled: 'disabled') # # => # # source://actionview//lib/action_view/helpers/form_helper.rb#1278 def text_area(object_name, method, options = T.unsafe(nil)); end # Returns an input tag of the "text" type tailored for accessing a specified attribute (identified by +method+) on an object # assigned to the template (identified by +object+). Additional options on the input tag can be passed as a # hash with +options+. These options will be tagged onto the HTML as an HTML element attribute as in the example # shown. # # ==== Examples # text_field(:article, :title, size: 20) # # => # # text_field(:article, :title, class: "create_input") # # => # # text_field(:article, :title, maxlength: 30, class: "title_input") # # => # # text_field(:session, :user, onchange: "if ($('#session_user').val() === 'admin') { alert('Your login cannot be admin!'); }") # # => # # text_field(:snippet, :code, size: 20, class: 'code_input') # # => # # source://actionview//lib/action_view/helpers/form_helper.rb#1176 def text_field(object_name, method, options = T.unsafe(nil)); end # Returns a textarea opening and closing tag set tailored for accessing a specified attribute (identified by +method+) # on an object assigned to the template (identified by +object+). Additional options on the input tag can be passed as a # hash with +options+. # # ==== Examples # textarea(:article, :body, cols: 20, rows: 40) # # => # # textarea(:comment, :text, size: "20x30") # # => # # textarea(:application, :notes, cols: 40, rows: 15, class: 'app_input') # # => # # textarea(:entry, :body, size: "20x20", disabled: 'disabled') # # => # # source://actionview//lib/action_view/helpers/form_helper.rb#1278 def textarea(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "time". # # The default value is generated by trying to call +strftime+ with "%T.%L" # on the object's value. If you pass include_seconds: false, it will be # formatted by trying to call +strftime+ with "%H:%M" on the object's value. # It is also possible to override this by passing the "value" option. # # ==== Options # # Supports the same options as FormTagHelper#time_field_tag. # # ==== Examples # # time_field("task", "started_at") # # => # # You can create values for the "min" and "max" attributes by passing # instances of Date or Time to the options hash. # # time_field("task", "started_at", min: Time.now) # # => # # Alternatively, you can pass a String formatted as an ISO8601 time as the # values for "min" and "max." # # time_field("task", "started_at", min: "01:00:00") # # => # # By default, provided times will be formatted including seconds. You can render just the hour # and minute by passing include_seconds: false. Some browsers will render a simpler UI # if you exclude seconds in the timestamp format. # # time_field("task", "started_at", value: Time.now, include_seconds: false) # # => # # source://actionview//lib/action_view/helpers/form_helper.rb#1480 def time_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "url". # # url_field("user", "homepage") # # => # # source://actionview//lib/action_view/helpers/form_helper.rb#1560 def url_field(object_name, method, options = T.unsafe(nil)); end # Returns a text_field of type "week". # # week_field("user", "born_on") # # => # # The default value is generated by trying to call +strftime+ with "%Y-W%W" # on the object's value, which makes it behave as expected for instances # of DateTime and ActiveSupport::TimeWithZone. # # @user.born_on = Date.new(1984, 5, 12) # week_field("user", "born_on") # # => # # source://actionview//lib/action_view/helpers/form_helper.rb#1551 def week_field(object_name, method, options = T.unsafe(nil)); end private # source://actionview//lib/action_view/helpers/form_helper.rb#466 def apply_form_for_options!(object, options); end # source://actionview//lib/action_view/helpers/form_helper.rb#1625 def default_form_builder_class; end # source://actionview//lib/action_view/helpers/form_helper.rb#1596 def html_options_for_form_with(url_for_options = T.unsafe(nil), model = T.unsafe(nil), html: T.unsafe(nil), local: T.unsafe(nil), skip_enforcing_utf8: T.unsafe(nil), **options); end # source://actionview//lib/action_view/helpers/form_helper.rb#1611 def instantiate_builder(record_name, record_object, options); end class << self # source://actionview//lib/action_view/helpers/form_helper.rb#482 def form_with_generates_ids; end # source://actionview//lib/action_view/helpers/form_helper.rb#482 def form_with_generates_ids=(val); end # source://actionview//lib/action_view/helpers/form_helper.rb#480 def form_with_generates_remote_forms; end # source://actionview//lib/action_view/helpers/form_helper.rb#480 def form_with_generates_remote_forms=(val); end # source://actionview//lib/action_view/helpers/form_helper.rb#484 def multiple_file_field_include_hidden; end # source://actionview//lib/action_view/helpers/form_helper.rb#484 def multiple_file_field_include_hidden=(val); end end end # = Action View Form Option \Helpers # # Provides a number of methods for turning different kinds of containers into a set of option tags. # # The collection_select, select and time_zone_select methods take an options parameter, a hash: # # * :include_blank - set to true or a prompt string if the first option element of the select element is a blank. Useful if there is not a default value required for the select element. # # select(:post, :category, Post::CATEGORIES, { include_blank: true }) # # could become: # # # # Another common case is a select tag for a belongs_to-associated object. # # Example with @post.person_id => 2: # # select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { include_blank: "None" }) # # could become: # # # # * :prompt - set to true or a prompt string. When the select element doesn't have a value yet, this prepends an option with a generic prompt -- "Please select" -- or the given prompt string. # # select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { prompt: "Select Person" }) # # could become: # # # # * :index - like the other form helpers, select can accept an :index option to manually set the ID used in the resulting output. Unlike other helpers, select expects this # option to be in the +html_options+ parameter. # # select("album[]", :genre, %w[ rap rock country ], {}, { index: nil }) # # becomes: # # # # * :disabled - can be a single value or an array of values that will be disabled options in the final output. # # select(:post, :category, Post::CATEGORIES, { disabled: "restricted" }) # # could become: # # # # When used with the collection_select helper, :disabled can also be a Proc that identifies those options that should be disabled. # # collection_select(:post, :category_id, Category.all, :id, :name, { disabled: -> (category) { category.archived? } }) # # If the categories "2008 stuff" and "Christmas" return true when the method archived? is called, this would return: # # # source://actionview//lib/action_view/helpers/form_options_helper.rb#94 module ActionView::Helpers::FormOptionsHelper include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper include ::ActionView::Helpers::TextHelper extend ::ActionView::Helpers::SanitizeHelper::ClassMethods # Returns check box tags for the collection of existing return values of # +method+ for +object+'s class. The value returned from calling +method+ # on the instance +object+ will be selected. If calling +method+ returns # +nil+, no selection is made. # # The :value_method and :text_method parameters are # methods to be called on each member of +collection+. The return values # are used as the +value+ attribute and contents of each check box tag, # respectively. They can also be any object that responds to +call+, such # as a +proc+, that will be called for each member of the +collection+ to # retrieve the value/text. # # Example object structure for use with this method: # class Post < ActiveRecord::Base # has_and_belongs_to_many :authors # end # class Author < ActiveRecord::Base # has_and_belongs_to_many :posts # def name_with_initial # "#{first_name.first}. #{last_name}" # end # end # # Sample usage (selecting the associated Author for an instance of Post, @post): # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) # # If @post.author_ids is already [1], this would return: # # # # # # # # # It is also possible to customize the way the elements will be shown by # giving a block to the method: # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| # b.label { b.checkbox } # end # # The argument passed to the block is a special kind of builder for this # collection, which has the ability to generate the label and check box # for the current item in the collection, with proper text and value. # Using it, you can change the label and check box display order or even # use the label as wrapper, as in the example above. # # The builder methods label and checkbox also accept # extra HTML options: # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| # b.label(class: "checkbox") { b.checkbox(class: "checkbox") } # end # # There are also three special methods available: object, text and # value, which are the current item being rendered, its text and value methods, # respectively. You can use them like this: # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| # b.label(:"data-value" => b.value) { b.checkbox + b.text } # end # # ==== Gotcha # # When no selection is made for a collection of checkboxes most # web browsers will not send any value. # # For example, if we have a +User+ model with +category_ids+ field and we # have the following code in our update action: # # @user.update(params[:user]) # # If no +category_ids+ are selected then we can safely assume this field # will not be updated. # # This is possible thanks to a hidden field generated by the helper method # for every collection of checkboxes. # This hidden field is given the same field name as the checkboxes with a # blank value. # # In the rare case you don't want this hidden field, you can pass the # include_hidden: false option to the helper method. # # source://actionview//lib/action_view/helpers/form_options_helper.rb#782 def collection_check_boxes(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Returns check box tags for the collection of existing return values of # +method+ for +object+'s class. The value returned from calling +method+ # on the instance +object+ will be selected. If calling +method+ returns # +nil+, no selection is made. # # The :value_method and :text_method parameters are # methods to be called on each member of +collection+. The return values # are used as the +value+ attribute and contents of each check box tag, # respectively. They can also be any object that responds to +call+, such # as a +proc+, that will be called for each member of the +collection+ to # retrieve the value/text. # # Example object structure for use with this method: # class Post < ActiveRecord::Base # has_and_belongs_to_many :authors # end # class Author < ActiveRecord::Base # has_and_belongs_to_many :posts # def name_with_initial # "#{first_name.first}. #{last_name}" # end # end # # Sample usage (selecting the associated Author for an instance of Post, @post): # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) # # If @post.author_ids is already [1], this would return: # # # # # # # # # It is also possible to customize the way the elements will be shown by # giving a block to the method: # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| # b.label { b.checkbox } # end # # The argument passed to the block is a special kind of builder for this # collection, which has the ability to generate the label and check box # for the current item in the collection, with proper text and value. # Using it, you can change the label and check box display order or even # use the label as wrapper, as in the example above. # # The builder methods label and checkbox also accept # extra HTML options: # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| # b.label(class: "checkbox") { b.checkbox(class: "checkbox") } # end # # There are also three special methods available: object, text and # value, which are the current item being rendered, its text and value methods, # respectively. You can use them like this: # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| # b.label(:"data-value" => b.value) { b.checkbox + b.text } # end # # ==== Gotcha # # When no selection is made for a collection of checkboxes most # web browsers will not send any value. # # For example, if we have a +User+ model with +category_ids+ field and we # have the following code in our update action: # # @user.update(params[:user]) # # If no +category_ids+ are selected then we can safely assume this field # will not be updated. # # This is possible thanks to a hidden field generated by the helper method # for every collection of checkboxes. # This hidden field is given the same field name as the checkboxes with a # blank value. # # In the rare case you don't want this hidden field, you can pass the # include_hidden: false option to the helper method. # # source://actionview//lib/action_view/helpers/form_options_helper.rb#782 def collection_checkboxes(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Returns radio button tags for the collection of existing return values # of +method+ for +object+'s class. The value returned from calling # +method+ on the instance +object+ will be selected. If calling +method+ # returns +nil+, no selection is made. # # The :value_method and :text_method parameters are # methods to be called on each member of +collection+. The return values # are used as the +value+ attribute and contents of each radio button tag, # respectively. They can also be any object that responds to +call+, such # as a +proc+, that will be called for each member of the +collection+ to # retrieve the value/text. # # Example object structure for use with this method: # # class Post < ActiveRecord::Base # belongs_to :author # end # # class Author < ActiveRecord::Base # has_many :posts # # def name_with_initial # "#{first_name.first}. #{last_name}" # end # end # # Sample usage (selecting the associated Author for an instance of Post, @post): # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) # # If @post.author_id is already 1, this would return: # # # # # # # # It is also possible to customize the way the elements will be shown by # giving a block to the method: # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b| # b.label { b.radio_button } # end # # The argument passed to the block is a special kind of builder for this # collection, which has the ability to generate the label and radio button # for the current item in the collection, with proper text and value. # Using it, you can change the label and radio button display order or # even use the label as wrapper, as in the example above. # # The builder methods label and radio_button also accept # extra HTML options: # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b| # b.label(class: "radio_button") { b.radio_button(class: "radio_button") } # end # # There are also three special methods available: object, text and # value, which are the current item being rendered, its text and value methods, # respectively. You can use them like this: # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b| # b.label(:"data-value" => b.value) { b.radio_button + b.text } # end # # ==== Gotcha # # The HTML specification says when nothing is selected on a collection of radio buttons # web browsers do not send any value to server. # Unfortunately this introduces a gotcha: # if a +User+ model has a +category_id+ field and in the form no category is selected, no +category_id+ parameter is sent. So, # any strong parameters idiom like: # # params.expect(user: [...]) # # will raise an error since no {user: ...} will be present. # # To prevent this the helper generates an auxiliary hidden field before # every collection of radio buttons. The hidden field has the same name as collection radio button and blank value. # # In case if you don't want the helper to generate this hidden field you can specify # include_hidden: false option. # # source://actionview//lib/action_view/helpers/form_options_helper.rb#698 def collection_radio_buttons(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Returns # # # # # # # source://actionview//lib/action_view/helpers/form_options_helper.rb#199 def collection_select(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end # Returns # # # # # # # # # # # source://actionview//lib/action_view/helpers/form_options_helper.rb#258 def grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end # Returns a string of tags, like options_for_select, but # wraps them with tags: # # grouped_options = [ # ['North America', # [['United States','US'],'Canada']], # ['Europe', # ['Denmark','Germany','France']] # ] # grouped_options_for_select(grouped_options) # # grouped_options = { # 'North America' => [['United States','US'], 'Canada'], # 'Europe' => ['Denmark','Germany','France'] # } # grouped_options_for_select(grouped_options) # # Possible output: # # # # # # # # # # # Parameters: # * +grouped_options+ - Accepts a nested array or hash of strings. The first value serves as the # label while the second value must be an array of options. The second value can be a # nested array of text-value pairs. See options_for_select for more info. # Ex. ["North America",[["United States","US"],["Canada","CA"]]] # An optional third value can be provided as HTML attributes for the optgroup. # Ex. ["North America",[["United States","US"],["Canada","CA"]], { disabled: "disabled" }] # * +selected_key+ - A value equal to the +value+ attribute for one of the tags, # which will have the +selected+ attribute set. Note: It is possible for this value to match multiple options # as you might have the same option in multiple groups. Each will then get selected="selected". # # Options: # * :prompt - set to true or a prompt string. When the select element doesn't have a value yet, this # prepends an option with a generic prompt - "Please select" - or the given prompt string. # * :divider - the divider for the options groups. # # grouped_options = [ # [['United States','US'], 'Canada'], # ['Denmark','Germany','France'] # ] # grouped_options_for_select(grouped_options, nil, divider: '---------') # # Possible output: # # # # # # # # # # # Note: Only the and tags are returned, so you still have to # wrap the output in an appropriate tag. # # source://actionview//lib/action_view/helpers/form_options_helper.rb#462 def option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = T.unsafe(nil)); end # Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container # where the elements respond to first and last (such as a two-element array), the "lasts" serve as option values and # the "firsts" as option text. Hashes are turned into this form automatically, so the keys become "firsts" and values # become lasts. If +selected+ is specified, the matching "last" or element will get the selected option-tag. +selected+ # may also be an array of values to be selected when using a multiple select. # # options_for_select([["Dollar", "$"], ["Kroner", "DKK"]]) # # => # # => # # options_for_select([ "VISA", "MasterCard" ], "MasterCard") # # => # # => # # options_for_select({ "Basic" => "$20", "Plus" => "$40" }, "$40") # # => # # => # # options_for_select([ "VISA", "MasterCard", "Discover" ], ["VISA", "Discover"]) # # => # # => # # => # # You can optionally provide HTML attributes as the last element of the array. # # options_for_select([ "Denmark", ["USA", { class: 'bold' }], "Sweden" ], ["USA", "Sweden"]) # # => # # => # # => # # options_for_select([["Dollar", "$", { class: "bold" }], ["Kroner", "DKK", { onclick: "alert('HI');" }]]) # # => # # => # # If you wish to specify disabled option tags, set +selected+ to be a hash, with :disabled being either a value # or array of values to be disabled. In this case, you can use :selected to specify selected option tags. # # options_for_select(["Free", "Basic", "Advanced", "Super Platinum"], disabled: "Super Platinum") # # => # # => # # => # # => # # options_for_select(["Free", "Basic", "Advanced", "Super Platinum"], disabled: ["Advanced", "Super Platinum"]) # # => # # => # # => # # => # # options_for_select(["Free", "Basic", "Advanced", "Super Platinum"], selected: "Free", disabled: "Super Platinum") # # => # # => # # => # # => # # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag. # # source://actionview//lib/action_view/helpers/form_options_helper.rb#358 def options_for_select(container, selected = T.unsafe(nil)); end # Returns a string of option tags that have been compiled by iterating over the +collection+ and assigning # the result of a call to the +value_method+ as the option value and the +text_method+ as the option text. # # options_from_collection_for_select(@people, 'id', 'name') # # => # # This is more often than not used inside a #select_tag like this example: # # select_tag 'person', options_from_collection_for_select(@people, 'id', 'name') # # If +selected+ is specified as a value or array of values, the element(s) returning a match on +value_method+ # will be selected option tag(s). # # If +selected+ is specified as a Proc, those members of the collection that return true for the anonymous # function are the selected values. # # +selected+ can also be a hash, specifying both :selected and/or :disabled values as required. # # Be sure to specify the same class as the +value_method+ when specifying selected or disabled options. # Failure to do this will produce undesired results. Example: # options_from_collection_for_select(@people, 'id', 'name', '1') # Will not select a person with the id of 1 because 1 (an Integer) is not the same as '1' (a string) # options_from_collection_for_select(@people, 'id', 'name', 1) # should produce the desired results. # # source://actionview//lib/action_view/helpers/form_options_helper.rb#401 def options_from_collection_for_select(collection, value_method, text_method, selected = T.unsafe(nil)); end # Create a select tag and a series of contained option tags for the provided object and method. # The option currently held by the object will be selected, provided that the object is available. # # There are two possible formats for the +choices+ parameter, corresponding to other helpers' output: # # * A flat collection (see options_for_select). # * A nested collection (see grouped_options_for_select). # # Example with @post.person_id => 2: # # select :post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { include_blank: true }) # # would become: # # # # This can be used to provide a default set of options in the standard way: before rendering the create form, a # new model instance is assigned the default options and bound to @model_name. Usually this model is not saved # to the database. Instead, a second model object is created when the create request is received. # This allows the user to submit a form page more than once with the expected results of creating multiple records. # In addition, this allows a single partial to be used to generate form inputs for both edit and create forms. # # By default, post.person_id is the selected option. Specify selected: value to use a different selection # or selected: nil to leave all options unselected. Similarly, you can specify values to be disabled in the option # tags by specifying the :disabled option. This can either be a single value or an array of values to be disabled. # # A block can be passed to +select+ to customize how the options tags will be rendered. This # is useful when the options tag has complex attributes. # # select(report, :campaign_ids) do # available_campaigns.each do |c| # tag.option(c.name, value: c.id, data: { tags: c.tags.to_json }) # end # end # # ==== Gotcha # # The HTML specification says when +multiple+ parameter passed to select and all options got deselected # web browsers do not send any value to server. Unfortunately this introduces a gotcha: # if a +User+ model has many +roles+ and have +role_ids+ accessor, and in the form that edits roles of the user # the user deselects all roles from +role_ids+ multiple select box, no +role_ids+ parameter is sent. So, # any mass-assignment idiom like # # @user.update(params[:user]) # # wouldn't update roles. # # To prevent this the helper generates an auxiliary hidden field before # every multiple select. The hidden field has the same name as multiple select and blank value. # # Note: The client either sends only the hidden field (representing # the deselected multiple select box), or both fields. This means that the resulting array # always contains a blank string. # # In case if you don't want the helper to generate this hidden field you can specify # include_hidden: false option. # # source://actionview//lib/action_view/helpers/form_options_helper.rb#159 def select(object, method, choices = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Returns a string of option tags for pretty much any time zone in the # world. Supply an ActiveSupport::TimeZone name as +selected+ to have it # marked as the selected option tag. You can also supply an array of # ActiveSupport::TimeZone objects as +priority_zones+, so that they will # be listed above the rest of the (long) list. (You can use # ActiveSupport::TimeZone.us_zones as a convenience for obtaining a list # of the US time zones, or a Regexp to select the zones of your choice) # # The +selected+ parameter must be either +nil+, or a string that names # an ActiveSupport::TimeZone. # # By default, +model+ is the ActiveSupport::TimeZone constant (which can # be obtained in Active Record as a value object). The +model+ parameter # must respond to +all+ and return an array of objects that represent time # zones; each object must respond to +name+. If a Regexp is given it will # attempt to match the zones using match? method. # # NOTE: Only the option tags are returned, you have to wrap this call in # a regular HTML select tag. # # source://actionview//lib/action_view/helpers/form_options_helper.rb#579 def time_zone_options_for_select(selected = T.unsafe(nil), priority_zones = T.unsafe(nil), model = T.unsafe(nil)); end # Returns select and option tags for the given object and method, using # #time_zone_options_for_select to generate the list of option tags. # # In addition to the :include_blank option documented above, # this method also supports a :model option, which defaults # to ActiveSupport::TimeZone. This may be used by users to specify a # different time zone model object. (See +time_zone_options_for_select+ # for more information.) # # You can also supply an array of ActiveSupport::TimeZone objects # as +priority_zones+ so that they will be listed above the rest of the # (long) list. You can use ActiveSupport::TimeZone.us_zones for a list # of US time zones, ActiveSupport::TimeZone.country_zones(country_code) # for another country's time zones, or a Regexp to select the zones of # your choice. # # Finally, this method supports a :default option, which selects # a default ActiveSupport::TimeZone if the object's time zone is +nil+. # # time_zone_select(:user, :time_zone, nil, include_blank: true) # # time_zone_select(:user, :time_zone, nil, default: "Pacific Time (US & Canada)") # # time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.us_zones, default: "Pacific Time (US & Canada)") # # time_zone_select(:user, :time_zone, [ ActiveSupport::TimeZone["Alaska"], ActiveSupport::TimeZone["Hawaii"] ]) # # time_zone_select(:user, :time_zone, /Australia/) # # time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.all.sort, model: ActiveSupport::TimeZone) # # source://actionview//lib/action_view/helpers/form_options_helper.rb#292 def time_zone_select(object, method, priority_zones = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil)); end # Returns a string of option tags for the days of the week. # # Options: # * :index_as_value - Defaults to false, set to true to use the indexes from # I18n.translate("date.day_names") as the values. By default, Sunday is always 0. # * :day_format - The I18n key of the array to use for the weekday options. # Defaults to +:day_names+, set to +:abbr_day_names+ for abbreviations. # * :beginning_of_week - Defaults to Date.beginning_of_week. # # NOTE: Only the option tags are returned, you have to wrap this call in # a regular HTML select tag. # # source://actionview//lib/action_view/helpers/form_options_helper.rb#611 def weekday_options_for_select(selected = T.unsafe(nil), index_as_value: T.unsafe(nil), day_format: T.unsafe(nil), beginning_of_week: T.unsafe(nil)); end # Returns select and option tags for the given object and method, using # weekday_options_for_select to generate the list of option tags. # # source://actionview//lib/action_view/helpers/form_options_helper.rb#298 def weekday_select(object, method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end private # source://actionview//lib/action_view/helpers/form_options_helper.rb#810 def extract_selected_and_disabled(selected); end # source://actionview//lib/action_view/helpers/form_options_helper.rb#821 def extract_values_from_collection(collection, value_method, selected); end # source://actionview//lib/action_view/helpers/form_options_helper.rb#788 def option_html_attributes(element); end # source://actionview//lib/action_view/helpers/form_options_helper.rb#796 def option_text_and_value(option); end # @return [Boolean] # # source://actionview//lib/action_view/helpers/form_options_helper.rb#806 def option_value_selected?(value, selected); end # source://actionview//lib/action_view/helpers/form_options_helper.rb#835 def prompt_text(prompt); end # source://actionview//lib/action_view/helpers/form_options_helper.rb#831 def value_for_collection(item, value); end end # = Action View Form Tag \Helpers # # Provides a number of methods for creating form tags that don't rely on an Active Record object assigned to the template like # FormHelper does. Instead, you provide the names and values manually. # # NOTE: The HTML options disabled, readonly, and multiple can all be treated as booleans. So specifying # disabled: true will give disabled="disabled". # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#19 module ActionView::Helpers::FormTagHelper include ::ActionView::Helpers::ContentExfiltrationPreventionHelper extend ::ActiveSupport::Concern include ::ActionView::Helpers::UrlHelper include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::TextHelper mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods # Creates a button element that defines a submit button, # reset button or a generic button which can be used in # JavaScript, for example. You can use the button tag as a regular # submit tag but it isn't supported in legacy browsers. However, # the button tag does allow for richer labels such as images and emphasis, # so this helper will also accept a block. By default, it will create # a button tag with type submit, if type is not given. # # ==== Options # * :data - This option can be used to add custom data attributes. # * :disabled - If true, the user will not be able to # use this input. # * Any other key creates standard HTML options for the tag. # # ==== Examples # button_tag # # => # # button_tag 'Reset', type: 'reset' # # => # # button_tag 'Button', type: 'button' # # => # # button_tag 'Reset', type: 'reset', disabled: true # # => # # button_tag(type: 'button') do # content_tag(:strong, 'Ask me!') # end # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#568 def button_tag(content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end # :call-seq: # checkbox_tag(name, options = {}) # checkbox_tag(name, value, options = {}) # checkbox_tag(name, value, checked, options = {}) # # Creates a check box form input tag. # # ==== Options # * :value - The value of the input. Defaults to "1". # * :checked - If set to true, the checkbox will be checked by default. # * :disabled - If set to true, the user will not be able to use this input. # * Any other key creates standard HTML options for the tag. # # ==== Examples # checkbox_tag 'accept' # # => # # checkbox_tag 'rock', 'rock music' # # => # # checkbox_tag 'receive_email', 'yes', true # # => # # checkbox_tag 'tos', 'yes', false, class: 'accept_tos' # # => # # checkbox_tag 'eula', 'accepted', false, disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#456 def check_box_tag(name, *args); end # :call-seq: # checkbox_tag(name, options = {}) # checkbox_tag(name, value, options = {}) # checkbox_tag(name, value, checked, options = {}) # # Creates a check box form input tag. # # ==== Options # * :value - The value of the input. Defaults to "1". # * :checked - If set to true, the checkbox will be checked by default. # * :disabled - If set to true, the user will not be able to use this input. # * Any other key creates standard HTML options for the tag. # # ==== Examples # checkbox_tag 'accept' # # => # # checkbox_tag 'rock', 'rock music' # # => # # checkbox_tag 'receive_email', 'yes', true # # => # # checkbox_tag 'tos', 'yes', false, class: 'accept_tos' # # => # # checkbox_tag 'eula', 'accepted', false, disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#456 def checkbox_tag(name, *args); end # Creates a text field of type "color". # # ==== Options # # Supports the same options as #text_field_tag. # # ==== Examples # # color_field_tag 'name' # # => # # color_field_tag 'color', '#DEF726' # # => # # color_field_tag 'color', nil, class: 'special_input' # # => # # color_field_tag 'color', '#DEF726', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#668 def color_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "date". # # ==== Options # # Supports the same options as #text_field_tag. # # ==== Examples # # date_field_tag 'name' # # => # # date_field_tag 'date', '2014-12-31' # # => # # date_field_tag 'date', nil, class: 'special_input' # # => # # date_field_tag 'date', '2014-12-31', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#738 def date_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "datetime-local". # # ==== Options # # Supports the same options as #text_field_tag. Additionally, supports: # # * :min - The minimum acceptable value. # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # * :include_seconds - Include seconds in the output timestamp format (true by default). # # ==== Examples # # datetime_field_tag 'name' # # => # # datetime_field_tag 'datetime', '2014-01-01T01:01' # # => # # datetime_field_tag 'datetime', nil, class: 'special_input' # # => # # datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#797 def datetime_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "datetime-local". # # ==== Options # # Supports the same options as #text_field_tag. Additionally, supports: # # * :min - The minimum acceptable value. # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # * :include_seconds - Include seconds in the output timestamp format (true by default). # # ==== Examples # # datetime_field_tag 'name' # # => # # datetime_field_tag 'datetime', '2014-01-01T01:01' # # => # # datetime_field_tag 'datetime', nil, class: 'special_input' # # => # # datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#797 def datetime_local_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 def default_enforce_utf8; end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 def default_enforce_utf8=(val); end # Creates a text field of type "email". # # ==== Options # # Supports the same options as #text_field_tag. # # ==== Examples # # email_field_tag 'name' # # => # # email_field_tag 'email', 'email@example.com' # # => # # email_field_tag 'email', nil, class: 'special_input' # # => # # email_field_tag 'email', 'email@example.com', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#899 def email_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 def embed_authenticity_token_in_remote_forms; end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 def embed_authenticity_token_in_remote_forms=(val); end # Generate an HTML id attribute value for the given name and # field combination # # Return the value generated by the FormBuilder for the given # attribute name. # # <%= label_tag :post, :title %> # <%= text_field :post, :title, aria: { describedby: field_id(:post, :title, :error) } %> # <%= tag.span("is blank", id: field_id(:post, :title, :error) %> # # In the example above, the element built by # the call to text_field declares an # aria-describedby attribute referencing the # element, sharing a common id root (post_title, in this # case). # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#102 def field_id(object_name, method_name, *suffixes, index: T.unsafe(nil), namespace: T.unsafe(nil)); end # Generate an HTML name attribute value for the given name and # field combination # # Return the value generated by the FormBuilder for the given # attribute name. # # <%= text_field :post, :title, name: field_name(:post, :title, :subtitle) %> # <%# => %> # # <%= text_field :post, :tag, name: field_name(:post, :tag, multiple: true) %> # <%# => %> # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#132 def field_name(object_name, method_name, *method_names, multiple: T.unsafe(nil), index: T.unsafe(nil)); end # Creates a field set for grouping HTML form elements. # # legend will become the fieldset's title (optional as per W3C). # options accept the same values as tag. # # ==== Examples # <%= field_set_tag do %> #

    <%= text_field_tag 'name' %>

    # <% end %> # # =>

    # # <%= field_set_tag 'Your details' do %> #

    <%= text_field_tag 'name' %>

    # <% end %> # # =>
    Your details

    # # <%= field_set_tag nil, class: 'format' do %> #

    <%= text_field_tag 'name' %>

    # <% end %> # # =>

    # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#640 def field_set_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end # Creates a field set for grouping HTML form elements. # # legend will become the fieldset's title (optional as per W3C). # options accept the same values as tag. # # ==== Examples # <%= field_set_tag do %> #

    <%= text_field_tag 'name' %>

    # <% end %> # # =>

    # # <%= field_set_tag 'Your details' do %> #

    <%= text_field_tag 'name' %>

    # <% end %> # # =>
    Your details

    # # <%= field_set_tag nil, class: 'format' do %> #

    <%= text_field_tag 'name' %>

    # <% end %> # # =>

    # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#640 def fieldset_tag(legend = T.unsafe(nil), options = T.unsafe(nil), &block); end # Creates a file upload field. If you are using file uploads then you will also need # to set the multipart option for the form tag: # # <%= form_tag '/upload', multipart: true do %> # <%= file_field_tag "file" %> # <%= submit_tag %> # <% end %> # # The specified URL will then be passed a File object containing the selected file, or if the field # was left blank, a StringIO object. # # ==== Options # * Creates standard HTML attributes for the tag. # * :disabled - If set to true, the user will not be able to use this input. # * :multiple - If set to true, *in most updated browsers* the user will be allowed to select multiple files. # * :accept - If set to one or multiple mime-types, the user will be suggested a filter when choosing a file. You still need to set up model validations. # # ==== Examples # file_field_tag 'attachment' # # => # # file_field_tag 'avatar', class: 'profile_input' # # => # # file_field_tag 'picture', disabled: true # # => # # file_field_tag 'resume', value: '~/resume.doc' # # => # # file_field_tag 'user_pic', accept: 'image/png,image/gif,image/jpeg' # # => # # file_field_tag 'file', accept: 'text/html', class: 'upload', value: 'index.html' # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#347 def file_field_tag(name, options = T.unsafe(nil)); end # Starts a form tag that points the action to a URL configured with url_for_options just like # ActionController::Base#url_for. The method for the form defaults to POST. # # ==== Options # * :multipart - If set to true, the enctype is set to "multipart/form-data". # * :method - The method to use when submitting the form, usually either "get" or "post". # If "patch", "put", "delete", or another verb is used, a hidden input with name _method # is added to simulate the verb over post. # * :authenticity_token - Authenticity token to use in the form. Use only if you need to # pass custom authenticity token string, or to not add authenticity_token field at all # (by passing false). Remote forms may omit the embedded authenticity token # by setting config.action_view.embed_authenticity_token_in_remote_forms = false. # This is helpful when you're fragment-caching the form. Remote forms get the # authenticity token from the meta tag, so embedding is unnecessary unless you # support browsers without JavaScript. # * :remote - If set to true, will allow the Unobtrusive JavaScript drivers to control the # submit behavior. By default this behavior is an ajax submit. # * :enforce_utf8 - If set to false, a hidden input with name utf8 is not output. # * Any other key creates standard HTML attributes for the tag. # # ==== Examples # form_tag('/posts') # # => # # form_tag('/posts/1', method: :put) # # => ... ... # # form_tag('/upload', multipart: true) # # => # # <%= form_tag('/posts') do -%> #
    <%= submit_tag 'Save' %>
    # <% end -%> # # =>
    # # <%= form_tag('/posts', remote: true) %> # # =>
    # # form_tag(false, method: :get) # # => # # form_tag('http://far.away.com/form', authenticity_token: false) # # form without authenticity token # # form_tag('http://far.away.com/form', authenticity_token: "cf50faa3fe97702ca1ae") # # form with custom authenticity token # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#78 def form_tag(url_for_options = T.unsafe(nil), options = T.unsafe(nil), &block); end # Creates a hidden form input field used to transmit data that would be lost due to HTTP's statelessness or # data that should be hidden from the user. # # ==== Options # * Creates standard HTML attributes for the tag. # # ==== Examples # hidden_field_tag 'tags_list' # # => # # hidden_field_tag 'token', 'VUBJKB23UIVI1UU1VOBVI@' # # => # # hidden_field_tag 'collected_input', '', onchange: "alert('Input collected!')" # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#308 def hidden_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Displays an image which when clicked will submit the form. # # source is passed to AssetTagHelper#path_to_image # # ==== Options # * :data - This option can be used to add custom data attributes. # * :disabled - If set to true, the user will not be able to use this input. # * Any other key creates standard HTML options for the tag. # # ==== Data attributes # # * confirm: 'question?' - This will add a JavaScript confirm # prompt with the question specified. If the user accepts, the form is # processed normally, otherwise no action is taken. # # ==== Examples # image_submit_tag("login.png") # # => # # image_submit_tag("purchase.png", disabled: true) # # => # # image_submit_tag("search.png", class: 'search_button', alt: 'Find') # # => # # image_submit_tag("agree.png", disabled: true, class: "agree_disagree_button") # # => # # image_submit_tag("save.png", data: { confirm: "Are you sure?" }) # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#614 def image_submit_tag(source, options = T.unsafe(nil)); end # Creates a label element. Accepts a block. # # ==== Options # * Creates standard HTML attributes for the tag. # # ==== Examples # label_tag 'name' # # => # # label_tag 'name', 'Your name' # # => # # label_tag 'name', nil, class: 'small_label' # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#281 def label_tag(name = T.unsafe(nil), content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end # Creates a text field of type "month". # # ==== Options # # Supports the same options as #text_field_tag. Additionally, supports: # # * :min - The minimum acceptable value. # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # # ==== Examples # # month_field_tag 'name' # # => # # month_field_tag 'month', '2014-01' # # => # # month_field_tag 'month', nil, class: 'special_input' # # => # # month_field_tag 'month', '2014-01', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#826 def month_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a number field. # # ==== Options # # Supports the same options as #text_field_tag. Additionally, supports: # # * :min - The minimum acceptable value. # * :max - The maximum acceptable value. # * :in - A range specifying the :min and # :max values. # * :within - Same as :in. # * :step - The acceptable value granularity. # # ==== Examples # # number_field_tag 'quantity' # # => # # number_field_tag 'quantity', '1' # # => # # number_field_tag 'quantity', nil, class: 'special_input' # # => # # number_field_tag 'quantity', nil, min: 1 # # => # # number_field_tag 'quantity', nil, max: 9 # # => # # number_field_tag 'quantity', nil, in: 1...10 # # => # # number_field_tag 'quantity', nil, within: 1...10 # # => # # number_field_tag 'quantity', nil, min: 1, max: 10 # # => # # number_field_tag 'quantity', nil, min: 1, max: 10, step: 2 # # => # # number_field_tag 'quantity', '1', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#947 def number_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a password field, a masked text field that will hide the users input behind a mask character. # # ==== Options # * :disabled - If set to true, the user will not be able to use this input. # * :size - The number of visible characters that will fit in the input. # * :maxlength - The maximum number of characters that the browser will allow the user to enter. # * Any other key creates standard HTML attributes for the tag. # # ==== Examples # password_field_tag 'pass' # # => # # password_field_tag 'secret', 'Your secret here' # # => # # password_field_tag 'masked', nil, class: 'masked_input_field' # # => # # password_field_tag 'token', '', size: 15 # # => # # password_field_tag 'key', nil, maxlength: 16 # # => # # password_field_tag 'confirm_pass', nil, disabled: true # # => # # password_field_tag 'pin', '1234', maxlength: 4, size: 6, class: "pin_input" # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#380 def password_field_tag(name = T.unsafe(nil), value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "tel". # # ==== Options # # Supports the same options as #text_field_tag. # # ==== Examples # # telephone_field_tag 'name' # # => # # telephone_field_tag 'tel', '0123456789' # # => # # telephone_field_tag 'tel', nil, class: 'special_input' # # => # # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#714 def phone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: # radio_button_tag(name, value, options = {}) # radio_button_tag(name, value, checked, options = {}) # # Creates a radio button; use groups of radio buttons named the same to allow users to # select from a group of options. # # ==== Options # * :checked - If set to true, the radio button will be selected by default. # * :disabled - If set to true, the user will not be able to use this input. # * Any other key creates standard HTML options for the tag. # # ==== Examples # radio_button_tag 'favorite_color', 'maroon' # # => # # radio_button_tag 'receive_updates', 'no', true # # => # # radio_button_tag 'time_slot', "3:00 p.m.", false, disabled: true # # => # # radio_button_tag 'color', "green", true, class: "color_input" # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#493 def radio_button_tag(name, value, *args); end # Creates a range form element. # # ==== Options # # Supports the same options as #number_field_tag. # # ==== Examples # # range_field_tag 'quantity', '1' # # => # # range_field_tag 'quantity', in: 1...10 # # => # # range_field_tag 'quantity', min: 1, max: 10, step: 2 # # => # # search_field_tag 'search', 'Enter your search query here' # # => # # search_field_tag 'search', nil, class: 'special_input' # # => # # search_field_tag 'search', 'Enter your search query here', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#691 def search_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a dropdown selection box, or if the :multiple option is set to true, a multiple # choice selection box. # # Helpers::FormOptions can be used to create common select boxes such as countries, time zones, or # associated records. option_tags is a string containing the option tags for the select box. # # ==== Options # * :multiple - If set to true, the selection will allow multiple choices. # * :disabled - If set to true, the user will not be able to use this input. # * :include_blank - If set to true, an empty option will be created. If set to a string, the string will be used as the option's content and the value will be empty. # * :prompt - Create a prompt option with blank value and the text asking user to select something. # * Any other key creates standard HTML attributes for the tag. # # ==== Examples # select_tag "people", options_from_collection_for_select(@people, "id", "name") # # # # select_tag "people", options_from_collection_for_select(@people, "id", "name", "1") # # # # select_tag "people", raw("") # # => # # select_tag "count", raw("") # # => # # select_tag "colors", raw(""), multiple: true # # => # # select_tag "locations", raw("") # # => # # select_tag "access", raw(""), multiple: true, class: 'form_input', id: 'unique_id' # # => # # select_tag "people", options_from_collection_for_select(@people, "id", "name"), include_blank: true # # => # # select_tag "people", options_from_collection_for_select(@people, "id", "name"), include_blank: "All" # # => # # select_tag "people", options_from_collection_for_select(@people, "id", "name"), prompt: "Select something" # # => # # select_tag "destination", raw(""), disabled: true # # => # # select_tag "credit_card", options_for_select([ "VISA", "MasterCard" ], "MasterCard") # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#201 def select_tag(name, option_tags = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a submit button with the text value as the caption. # # ==== Options # * :data - This option can be used to add custom data attributes. # * :disabled - If true, the user will not be able to use this input. # * Any other key creates standard HTML options for the tag. # # ==== Examples # submit_tag # # => # # submit_tag "Edit this article" # # => # # submit_tag "Save edits", disabled: true # # => # # submit_tag nil, class: "form_submit" # # => # # submit_tag "Edit", class: "edit_button" # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#527 def submit_tag(value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "tel". # # ==== Options # # Supports the same options as #text_field_tag. # # ==== Examples # # telephone_field_tag 'name' # # => # # telephone_field_tag 'tel', '0123456789' # # => # # telephone_field_tag 'tel', nil, class: 'special_input' # # => # # telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#714 def telephone_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions. # # ==== Options # * :size - A string specifying the dimensions (columns by rows) of the textarea (e.g., "25x10"). # * :rows - Specify the number of rows in the textarea # * :cols - Specify the number of columns in the textarea # * :disabled - If set to true, the user will not be able to use this input. # * :escape - By default, the contents of the text input are HTML escaped. # If you need unescaped contents, set this to false. # * Any other key creates standard HTML attributes for the tag. # # ==== Examples # textarea_tag 'post' # # => # # textarea_tag 'bio', @user.bio # # => # # textarea_tag 'body', nil, rows: 10, cols: 25 # # => # # textarea_tag 'body', nil, size: "25x10" # # => # # textarea_tag 'description', "Description goes here.", disabled: true # # => # # textarea_tag 'comment', nil, class: 'comment_input' # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#413 def text_area_tag(name, content = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a standard text field; use these text fields to input smaller chunks of text like a username # or a search query. # # ==== Options # * :disabled - If set to true, the user will not be able to use this input. # * :size - The number of visible characters that will fit in the input. # * :maxlength - The maximum number of characters that the browser will allow the user to enter. # * :placeholder - The text contained in the field by default which is removed when the field receives focus. # If set to true, use the translation found in the current I18n locale # (through helpers.placeholder..). # * Any other key creates standard HTML attributes for the tag. # # ==== Examples # text_field_tag 'name' # # => # # text_field_tag 'query', 'Enter your search query here' # # => # # text_field_tag 'search', nil, placeholder: 'Enter search term...' # # => # # text_field_tag 'request', nil, class: 'special_input' # # => # # text_field_tag 'address', '', size: 75 # # => # # text_field_tag 'zip', nil, maxlength: 5 # # => # # text_field_tag 'payment_amount', '$0.00', disabled: true # # => # # text_field_tag 'ip', '0.0.0.0', maxlength: 15, size: 20, class: "ip-input" # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#263 def text_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions. # # ==== Options # * :size - A string specifying the dimensions (columns by rows) of the textarea (e.g., "25x10"). # * :rows - Specify the number of rows in the textarea # * :cols - Specify the number of columns in the textarea # * :disabled - If set to true, the user will not be able to use this input. # * :escape - By default, the contents of the text input are HTML escaped. # If you need unescaped contents, set this to false. # * Any other key creates standard HTML attributes for the tag. # # ==== Examples # textarea_tag 'post' # # => # # textarea_tag 'bio', @user.bio # # => # # textarea_tag 'body', nil, rows: 10, cols: 25 # # => # # textarea_tag 'body', nil, size: "25x10" # # => # # textarea_tag 'description', "Description goes here.", disabled: true # # => # # textarea_tag 'comment', nil, class: 'comment_input' # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#413 def textarea_tag(name, content = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "time". # # ==== Options # # Supports the same options as #text_field_tag. Additionally, supports: # # * :min - The minimum acceptable value. # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # * :include_seconds - Include seconds and ms in the output timestamp format (true by default). # # ==== Examples # # time_field_tag 'name' # # => # # time_field_tag 'time', '01:01' # # => # # time_field_tag 'time', nil, class: 'special_input' # # => # # time_field_tag 'time', '01:01', include_seconds: true # # => # # time_field_tag 'time', '01:01', min: '00:00', max: '23:59', step: 1 # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#769 def time_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates a text field of type "url". # # ==== Options # # Supports the same options as #text_field_tag. # # ==== Examples # # url_field_tag 'name' # # => # # url_field_tag 'url', 'http://rubyonrails.org' # # => # # url_field_tag 'url', nil, class: 'special_input' # # => # # url_field_tag 'url', 'http://rubyonrails.org', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#876 def url_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end # Creates the hidden UTF-8 enforcer tag. Override this method in a helper # to customize the tag. # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#978 def utf8_enforcer_tag; end # Creates a text field of type "week". # # ==== Options # # Supports the same options as #text_field_tag. Additionally, supports: # # * :min - The minimum acceptable value. # * :max - The maximum acceptable value. # * :step - The acceptable value granularity. # # ==== Examples # # week_field_tag 'name' # # => # # week_field_tag 'week', '2014-W01' # # => # # week_field_tag 'week', nil, class: 'special_input' # # => # # week_field_tag 'week', '2014-W01', class: 'special_input', disabled: true # # => # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#853 def week_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end private # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1075 def convert_direct_upload_option_to_url(options); end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1013 def extra_tags_for_form(html_options); end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1043 def form_tag_html(html_options); end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1049 def form_tag_with_body(html_options, content); end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#986 def html_options_for_form(url_for_options, options); end # see http://www.w3.org/TR/html4/types.html#type-name # # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1056 def sanitize_to_id(name); end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#1060 def set_default_disable_with(value, tag_options); end class << self # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 def default_enforce_utf8; end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#29 def default_enforce_utf8=(val); end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 def embed_authenticity_token_in_remote_forms; end # source://actionview//lib/action_view/helpers/form_tag_helper.rb#26 def embed_authenticity_token_in_remote_forms=(val); end end end # = Action View JavaScript \Helpers # # source://actionview//lib/action_view/helpers/javascript_helper.rb#6 module ActionView::Helpers::JavaScriptHelper # Escapes carriage returns and single and double quotes for JavaScript segments. # # Also available through the alias j(). This is particularly helpful in JavaScript # responses, like: # # $('some_element').replaceWith('<%= j render 'some/element_template' %>'); # # source://actionview//lib/action_view/helpers/javascript_helper.rb#28 def escape_javascript(javascript); end # Escapes carriage returns and single and double quotes for JavaScript segments. # # Also available through the alias j(). This is particularly helpful in JavaScript # responses, like: # # $('some_element').replaceWith('<%= j render 'some/element_template' %>'); # # source://actionview//lib/action_view/helpers/javascript_helper.rb#28 def j(javascript); end # source://actionview//lib/action_view/helpers/javascript_helper.rb#91 def javascript_cdata_section(content); end # Returns a JavaScript tag with the +content+ inside. Example: # javascript_tag "alert('All is good')" # # Returns: # # # +html_options+ may be a hash of attributes for the \ # # Instead of passing the content as an argument, you can also use a block # in which case, you pass your +html_options+ as the first parameter. # # <%= javascript_tag type: 'application/javascript' do -%> # alert('All is good') # <% end -%> # # If you have a content security policy enabled then you can add an automatic # nonce value by passing nonce: true as part of +html_options+. Example: # # <%= javascript_tag nonce: true do -%> # alert('All is good') # <% end -%> # # source://actionview//lib/action_view/helpers/javascript_helper.rb#75 def javascript_tag(content_or_options_with_block = T.unsafe(nil), html_options = T.unsafe(nil), &block); end end # source://actionview//lib/action_view/helpers/javascript_helper.rb#7 ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP = T.let(T.unsafe(nil), Hash) # = Action View Number \Helpers # # Provides methods for converting numbers into formatted strings. # Methods are provided for phone numbers, currency, percentage, # precision, positional notation, file size, and pretty printing. # # Most methods expect a +number+ argument, and will return it # unchanged if can't be converted into a valid number. # # source://actionview//lib/action_view/helpers/number_helper.rb#17 module ActionView::Helpers::NumberHelper # Delegates to ActiveSupport::NumberHelper#number_to_currency. # # Additionally, supports a +:raise+ option that will cause # InvalidNumberError to be raised if +number+ is not a valid number: # # number_to_currency("12x34") # => "$12x34" # number_to_currency("12x34", raise: true) # => InvalidNumberError # # source://actionview//lib/action_view/helpers/number_helper.rb#51 def number_to_currency(number, options = T.unsafe(nil)); end # Delegates to ActiveSupport::NumberHelper#number_to_human. # # Additionally, supports a +:raise+ option that will cause # InvalidNumberError to be raised if +number+ is not a valid number: # # number_to_human("12x34") # => "12x34" # number_to_human("12x34", raise: true) # => InvalidNumberError # # source://actionview//lib/action_view/helpers/number_helper.rb#111 def number_to_human(number, options = T.unsafe(nil)); end # Delegates to ActiveSupport::NumberHelper#number_to_human_size. # # Additionally, supports a +:raise+ option that will cause # InvalidNumberError to be raised if +number+ is not a valid number: # # number_to_human_size("12x34") # => "12x34" # number_to_human_size("12x34", raise: true) # => InvalidNumberError # # source://actionview//lib/action_view/helpers/number_helper.rb#99 def number_to_human_size(number, options = T.unsafe(nil)); end # Delegates to ActiveSupport::NumberHelper#number_to_percentage. # # Additionally, supports a +:raise+ option that will cause # InvalidNumberError to be raised if +number+ is not a valid number: # # number_to_percentage("99x") # => "99x%" # number_to_percentage("99x", raise: true) # => InvalidNumberError # # source://actionview//lib/action_view/helpers/number_helper.rb#63 def number_to_percentage(number, options = T.unsafe(nil)); end # Delegates to ActiveSupport::NumberHelper#number_to_phone. # # Additionally, supports a +:raise+ option that will cause # InvalidNumberError to be raised if +number+ is not a valid number: # # number_to_phone("12x34") # => "12x34" # number_to_phone("12x34", raise: true) # => InvalidNumberError # # source://actionview//lib/action_view/helpers/number_helper.rb#35 def number_to_phone(number, options = T.unsafe(nil)); end # Delegates to ActiveSupport::NumberHelper#number_to_delimited. # # Additionally, supports a +:raise+ option that will cause # InvalidNumberError to be raised if +number+ is not a valid number: # # number_with_delimiter("12x34") # => "12x34" # number_with_delimiter("12x34", raise: true) # => InvalidNumberError # # source://actionview//lib/action_view/helpers/number_helper.rb#75 def number_with_delimiter(number, options = T.unsafe(nil)); end # Delegates to ActiveSupport::NumberHelper#number_to_rounded. # # Additionally, supports a +:raise+ option that will cause # InvalidNumberError to be raised if +number+ is not a valid number: # # number_with_precision("12x34") # => "12x34" # number_with_precision("12x34", raise: true) # => InvalidNumberError # # source://actionview//lib/action_view/helpers/number_helper.rb#87 def number_with_precision(number, options = T.unsafe(nil)); end private # source://actionview//lib/action_view/helpers/number_helper.rb#116 def delegate_number_helper_method(method, number, options); end # source://actionview//lib/action_view/helpers/number_helper.rb#135 def escape_units(units); end # source://actionview//lib/action_view/helpers/number_helper.rb#125 def escape_unsafe_options(options); end # @raise [InvalidNumberError] # # source://actionview//lib/action_view/helpers/number_helper.rb#158 def parse_float(number, raise_error); end # @return [Boolean] # # source://actionview//lib/action_view/helpers/number_helper.rb#154 def valid_float?(number); end # @raise [InvalidNumberError] # # source://actionview//lib/action_view/helpers/number_helper.rb#141 def wrap_with_output_safety_handling(number, raise_on_invalid, &block); end end # Raised when argument +number+ param given to the helpers is invalid and # the option +:raise+ is set to +true+. # # source://actionview//lib/action_view/helpers/number_helper.rb#20 class ActionView::Helpers::NumberHelper::InvalidNumberError < ::StandardError # @return [InvalidNumberError] a new instance of InvalidNumberError # # source://actionview//lib/action_view/helpers/number_helper.rb#22 def initialize(number); end # Returns the value of attribute number. # # source://actionview//lib/action_view/helpers/number_helper.rb#21 def number; end # Sets the attribute number # # @param value the value to set the attribute number to. # # source://actionview//lib/action_view/helpers/number_helper.rb#21 def number=(_arg0); end end # = Action View Raw Output \Helpers # # source://actionview//lib/action_view/helpers/output_safety_helper.rb#8 module ActionView::Helpers::OutputSafetyHelper # This method outputs without escaping a string. Since escaping tags is # now default, this can be used when you don't want \Rails to automatically # escape tags. This is not recommended if the data is coming from the user's # input. # # For example: # # raw @user.name # # => 'Jimmy Tables' # # source://actionview//lib/action_view/helpers/output_safety_helper.rb#18 def raw(stringish); end # This method returns an HTML safe string similar to what Array#join # would return. The array is flattened, and all items, including # the supplied separator, are HTML escaped unless they are HTML # safe, and the returned string is marked as HTML safe. # # safe_join([tag.p("foo"), "

    bar

    "], "
    ") # # => "

    foo

    <br><p>bar</p>" # # safe_join([tag.p("foo"), tag.p("bar")], tag.br) # # => "

    foo


    bar

    " # # source://actionview//lib/action_view/helpers/output_safety_helper.rb#33 def safe_join(array, sep = T.unsafe(nil)); end # Converts the array to a comma-separated sentence where the last element is # joined by the connector word. This is the html_safe-aware version of # ActiveSupport's {Array#to_sentence}[https://api.rubyonrails.org/classes/Array.html#method-i-to_sentence]. # # source://actionview//lib/action_view/helpers/output_safety_helper.rb#43 def to_sentence(array, options = T.unsafe(nil)); end end # # Action View Rendering Helpers # # Implements methods that allow rendering from a view context. In order to use # this module, all you need is to implement view_renderer that returns an # ActionView::Renderer object. # # source://actionview//lib/action_view/helpers/rendering_helper.rb#12 module ActionView::Helpers::RenderingHelper # Overrides _layout_for in the context object so it supports the case a block is # passed to a partial. Returns the contents that are yielded to a layout, given # a name or a block. # # You can think of a layout as a method that is called with a block. If the user # calls `yield :some_name`, the block, by default, returns # `content_for(:some_name)`. If the user calls simply `yield`, the default block # returns `content_for(:layout)`. # # The user can override this default by passing a block to the layout: # # # The template # <%= render layout: "my_layout" do %> # Content # <% end %> # # # The layout # # <%= yield %> # # # In this case, instead of the default block, which would return `content_for(:layout)`, # this method returns the block that was passed in to `render :layout`, and the response # would be # # # Content # # # Finally, the block can take block arguments, which can be passed in by # `yield`: # # # The template # <%= render layout: "my_layout" do |customer| %> # Hello <%= customer.name %> # <% end %> # # # The layout # # <%= yield Struct.new(:name).new("David") %> # # # In this case, the layout would receive the block passed into `render :layout`, # and the struct specified would be passed into the block as an argument. The result # would be # # # Hello David # # # source://actionview//lib/action_view/helpers/rendering_helper.rb#207 def _layout_for(*args, &block); end # Renders a template and returns the result. # # Pass the template to render as the first argument. This is shorthand # syntax for partial rendering, so the template filename should be # prefixed with an underscore. The partial renderer looks for the partial # template in the directory of the calling template first. # # <% # app/views/posts/new.html.erb %> # <%= render "form" %> # # => renders app/views/posts/_form.html.erb # # Use the complete view path to render a partial from another directory. # # <% # app/views/posts/show.html.erb %> # <%= render "comments/form" %> # # => renders app/views/comments/_form.html.erb # # Without the rendering mode, the second argument can be a Hash of local # variable assignments for the template. # # <% # app/views/posts/new.html.erb %> # <%= render "form", post: Post.new %> # # => renders app/views/posts/_form.html.erb # # If the first argument responds to `render_in`, the template will be rendered # by calling `render_in` with the current view context. # # class Greeting # def render_in(view_context) # view_context.render html: "

    Hello, World

    " # end # # def format # :html # end # end # # <%= render Greeting.new %> # # => "

    Hello, World

    " # # #### Rendering Mode # # Pass the rendering mode as first argument to override it. # # `:partial` # : See ActionView::PartialRenderer for details. # # <%= render partial: "form", locals: { post: Post.new } %> # # => renders app/views/posts/_form.html.erb # # `:file` # : Renders the contents of a file. This option should **not** be used with # unsanitized user input. # # <%= render file: "/path/to/some/file" %> # # => renders /path/to/some/file # # `:inline` # : Renders an ERB template string. # # <% name = "World" %> # <%= render inline: "

    Hello, <%= name %>!

    " %> # # => renders "

    Hello, World!

    " # # `:body` # : Renders the provided text, and sets the format as `:text`. # # <%= render body: "Hello, World!" %> # # => renders "Hello, World!" # # `:plain` # : Renders the provided text, and sets the format as `:text`. # # <%= render plain: "Hello, World!" %> # # => renders "Hello, World!" # # `:html` # : Renders the provided HTML string, and sets the format as # `:html`. If the string is not `html_safe?`, performs HTML escaping on # the string before rendering. # # <%= render html: "

    Hello, World!

    ".html_safe %> # # => renders "

    Hello, World!

    " # # <%= render html: "

    Hello, World!

    " %> # # => renders "<h1>Hello, World!</h1>" # # `:renderable` # : Renders the provided object by calling `render_in` with the current view # context. The format is determined by calling `format` on the # renderable if it responds to `format`, falling back to `:html` by # default. # # <%= render renderable: Greeting.new %> # # => renders "

    Hello, World

    " # # # #### Options # # `:locals` # : Hash of local variable assignments for the template. # # <%= render inline: "

    Hello, <%= name %>!

    ", locals: { name: "World" } %> # # => renders "

    Hello, World!

    " # # `:formats` # : Override the current format to render a template for a different format. # # <% # app/views/posts/show.html.erb %> # <%= render template: "posts/content", formats: [:text] %> # # => renders app/views/posts/content.text.erb # # `:variants` # : Render a template for a different variant. # # <% # app/views/posts/show.html.erb %> # <%= render template: "posts/content", variants: [:tablet] %> # # => renders app/views/posts/content.html+tablet.erb # # `:handlers` # : Render a template for a different handler. # # <% # app/views/posts/show.html.erb %> # <%= render template: "posts/content", handlers: [:builder] %> # # => renders app/views/posts/content.html.builder # # source://actionview//lib/action_view/helpers/rendering_helper.rb#138 def render(options = T.unsafe(nil), locals = T.unsafe(nil), &block); end end # = Action View Sanitize \Helpers # # The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements. # These helper methods extend Action View making them callable within your template files. # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#11 module ActionView::Helpers::SanitizeHelper extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods # Sanitizes HTML input, stripping all but known-safe tags and attributes. # # It also strips +href+ / +src+ attributes with unsafe protocols like +javascript:+, while # also protecting against attempts to use Unicode, ASCII, and hex character references to work # around these protocol filters. # # The default sanitizer is +Rails::HTML5::SafeListSanitizer+. See {Rails HTML # Sanitizers}[https://github.com/rails/rails-html-sanitizer] for more information. # # Custom sanitization rules can also be provided. # # Please note that sanitizing user-provided text does not guarantee that the # resulting markup is valid or even well-formed. # # ==== Options # # [+:tags+] # An array of allowed tags. # # [+:attributes+] # An array of allowed attributes. # # [+:scrubber+] # A {Rails::HTML scrubber}[https://github.com/rails/rails-html-sanitizer] # or {Loofah::Scrubber}[https://github.com/flavorjones/loofah] object that # defines custom sanitization rules. A custom scrubber takes precedence over # custom tags and attributes. # # ==== Examples # # ===== Normal use # # <%= sanitize @comment.body %> # # ===== Providing custom lists of permitted tags and attributes # # <%= sanitize @comment.body, tags: %w(strong em a), attributes: %w(href) %> # # ===== Providing a custom +Rails::HTML+ scrubber # # class CommentScrubber < Rails::HTML::PermitScrubber # def initialize # super # self.tags = %w( form script comment blockquote ) # self.attributes = %w( style ) # end # # def skip_node?(node) # node.text? # end # end # # # # <%= sanitize @comment.body, scrubber: CommentScrubber.new %> # # See {Rails HTML Sanitizer}[https://github.com/rails/rails-html-sanitizer] for # documentation about +Rails::HTML+ scrubbers. # # ===== Providing a custom +Loofah::Scrubber+ # # scrubber = Loofah::Scrubber.new do |node| # node.remove if node.name == 'script' # end # # # # <%= sanitize @comment.body, scrubber: scrubber %> # # See {Loofah's documentation}[https://github.com/flavorjones/loofah] for more # information about defining custom +Loofah::Scrubber+ objects. # # ==== Global Configuration # # To set the default allowed tags or attributes across your application: # # # In config/application.rb # config.action_view.sanitized_allowed_tags = ['strong', 'em', 'a'] # config.action_view.sanitized_allowed_attributes = ['href', 'title'] # # The default, starting in \Rails 7.1, is to use an HTML5 parser for sanitization (if it is # available, see NOTE below). If you wish to revert back to the previous HTML4 behavior, you # can do so by setting the following in your application configuration: # # # In config/application.rb # config.action_view.sanitizer_vendor = Rails::HTML4::Sanitizer # # Or, if you're upgrading from a previous version of \Rails and wish to opt into the HTML5 # behavior: # # # In config/application.rb # config.action_view.sanitizer_vendor = Rails::HTML5::Sanitizer # # NOTE: +Rails::HTML5::Sanitizer+ is not supported on JRuby, so on JRuby platforms \Rails will # fall back to using +Rails::HTML4::Sanitizer+. # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#111 def sanitize(html, options = T.unsafe(nil)); end # Sanitizes a block of CSS code. Used by #sanitize when it comes across a style attribute. # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#116 def sanitize_css(style); end # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 def sanitizer_vendor; end # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 def sanitizer_vendor=(val); end # Strips all link tags from +html+ leaving just the link text. # # strip_links('Ruby on Rails') # # => Ruby on Rails # # strip_links('Please e-mail me at me@email.com.') # # => Please e-mail me at me@email.com. # # strip_links('Blog: Visit.') # # => Blog: Visit. # # strip_links('<malformed & link') # # => <malformed & link # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#150 def strip_links(html); end # Strips all HTML tags from +html+, including comments and special characters. # # strip_tags("Strip these tags!") # # => Strip these tags! # # strip_tags("Bold no more! See more here...") # # => Bold no more! See more here... # # strip_tags("
    Welcome to my website!
    ") # # => Welcome to my website! # # strip_tags("> A quote from Smith & Wesson") # # => > A quote from Smith & Wesson # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#133 def strip_tags(html); end class << self # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 def sanitizer_vendor; end # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 def sanitizer_vendor=(val); end end end # source://actionview//lib/action_view/helpers/sanitize_helper.rb#154 module ActionView::Helpers::SanitizeHelper::ClassMethods # Gets the Rails::HTML::FullSanitizer instance used by +strip_tags+. Replace with # any object that responds to +sanitize+. # # class Application < Rails::Application # config.action_view.full_sanitizer = MySpecialSanitizer.new # end # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#175 def full_sanitizer; end # Sets the attribute full_sanitizer # # @param value the value to set the attribute full_sanitizer to. # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 def full_sanitizer=(_arg0); end # Gets the Rails::HTML::LinkSanitizer instance used by +strip_links+. # Replace with any object that responds to +sanitize+. # # class Application < Rails::Application # config.action_view.link_sanitizer = MySpecialSanitizer.new # end # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#185 def link_sanitizer; end # Sets the attribute link_sanitizer # # @param value the value to set the attribute link_sanitizer to. # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 def link_sanitizer=(_arg0); end # Gets the Rails::HTML::SafeListSanitizer instance used by sanitize and +sanitize_css+. # Replace with any object that responds to +sanitize+. # # class Application < Rails::Application # config.action_view.safe_list_sanitizer = MySpecialSanitizer.new # end # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#195 def safe_list_sanitizer; end # Sets the attribute safe_list_sanitizer # # @param value the value to set the attribute safe_list_sanitizer to. # # source://actionview//lib/action_view/helpers/sanitize_helper.rb#155 def safe_list_sanitizer=(_arg0); end # source://actionview//lib/action_view/helpers/sanitize_helper.rb#165 def sanitized_allowed_attributes; end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#34 def sanitized_allowed_attributes=(attributes); end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 def sanitized_allowed_css_keywords; end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 def sanitized_allowed_css_keywords=(_); end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 def sanitized_allowed_css_properties; end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 def sanitized_allowed_css_properties=(_); end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 def sanitized_allowed_protocols; end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 def sanitized_allowed_protocols=(_); end # source://actionview//lib/action_view/helpers/sanitize_helper.rb#161 def sanitized_allowed_tags; end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#24 def sanitized_allowed_tags=(tags); end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 def sanitized_bad_tags; end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 def sanitized_bad_tags=(_); end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 def sanitized_protocol_separator; end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 def sanitized_protocol_separator=(_); end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 def sanitized_shorthand_css_properties; end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 def sanitized_shorthand_css_properties=(_); end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#47 def sanitized_uri_attributes; end # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#48 def sanitized_uri_attributes=(_); end # source://actionview//lib/action_view/helpers/sanitize_helper.rb#157 def sanitizer_vendor; end private # source://rails-html-sanitizer/1.6.2/lib/rails-html-sanitizer.rb#52 def deprecate_option(name); end end # = Action View Tag \Helpers # # Provides methods to generate HTML tags programmatically both as a modern # HTML5 compliant builder style and legacy XHTML compliant tags. # # source://actionview//lib/action_view/helpers/tag_helper.rb#16 module ActionView::Helpers::TagHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper # Returns a CDATA section with the given +content+. CDATA sections # are used to escape blocks of text containing characters which would # otherwise be recognized as markup. CDATA sections begin with the string # and end with (and may not contain) the string ]]>. # # cdata_section("") # # => ]]> # # cdata_section(File.read("hello_world.txt")) # # => # # cdata_section("hello]]>world") # # => world]]> # # source://actionview//lib/action_view/helpers/tag_helper.rb#558 def cdata_section(content); end # Returns a string of tokens built from +args+. # # ==== Examples # token_list("foo", "bar") # # => "foo bar" # token_list("foo", "foo bar") # # => "foo bar" # token_list({ foo: true, bar: false }) # # => "foo" # token_list(nil, false, 123, "", "foo", { bar: true }) # # => "123 foo bar" # # source://actionview//lib/action_view/helpers/tag_helper.rb#538 def class_names(*args); end # Returns an HTML block tag of type +name+ surrounding the +content+. Add # HTML attributes by passing an attributes hash to +options+. # Instead of passing the content as an argument, you can also use a block # in which case, you pass your +options+ as the second parameter. # Set escape to false to disable escaping. # Note: this is legacy syntax, see +tag+ method description for details. # # ==== Options # The +options+ hash can be used with attributes with no value like (disabled and # readonly), which you can give a value of true in the +options+ hash. You can use # symbols or strings for the attribute names. # # ==== Examples # content_tag(:p, "Hello world!") # # =>

    Hello world!

    # content_tag(:div, content_tag(:p, "Hello world!"), class: "strong") # # =>

    Hello world!

    # content_tag(:div, "Hello world!", class: ["strong", "highlight"]) # # =>
    Hello world!
    # content_tag(:div, "Hello world!", class: ["strong", { highlight: current_user.admin? }]) # # =>
    Hello world!
    # content_tag("select", options, multiple: true) # # => # # <%= content_tag :div, class: "strong" do -%> # Hello world! # <% end -%> # # =>
    Hello world!
    # # source://actionview//lib/action_view/helpers/tag_helper.rb#516 def content_tag(name, content_or_options_with_block = T.unsafe(nil), options = T.unsafe(nil), escape = T.unsafe(nil), &block); end # Returns an escaped version of +html+ without affecting existing escaped entities. # # escape_once("1 < 2 & 3") # # => "1 < 2 & 3" # # escape_once("<< Accept & Checkout") # # => "<< Accept & Checkout" # # source://actionview//lib/action_view/helpers/tag_helper.rb#570 def escape_once(html); end # Returns an HTML tag. # # === Building HTML tags # # Builds HTML5 compliant tags with a tag proxy. Every tag can be built with: # # tag.(optional content, options) # # where tag name can be e.g. br, div, section, article, or any tag really. # # ==== Passing content # # Tags can pass content to embed within it: # # tag.h1 'All titles fit to print' # =>

    All titles fit to print

    # # tag.div tag.p('Hello world!') # =>

    Hello world!

    # # Content can also be captured with a block, which is useful in templates: # # <%= tag.p do %> # The next great American novel starts here. # <% end %> # # =>

    The next great American novel starts here.

    # # ==== Options # # Use symbol keyed options to add attributes to the generated tag. # # tag.section class: %w( kitties puppies ) # # =>
    # # tag.section id: dom_id(@post) # # =>
    # # Pass +true+ for any attributes that can render with no values, like +disabled+ and +readonly+. # # tag.input type: 'text', disabled: true # # => # # HTML5 data-* and aria-* attributes can be set with a # single +data+ or +aria+ key pointing to a hash of sub-attributes. # # To play nicely with JavaScript conventions, sub-attributes are dasherized. # # tag.article data: { user_id: 123 } # # =>
    # # Thus data-user-id can be accessed as dataset.userId. # # Data attribute values are encoded to JSON, with the exception of strings, symbols, and # BigDecimals. # This may come in handy when using jQuery's HTML5-aware .data() # from 1.4.3. # # tag.div data: { city_state: %w( Chicago IL ) } # # =>
    # # The generated tag names and attributes are escaped by default. This can be disabled using # +escape+. # # tag.img src: 'open & shut.png' # # => # # tag.img src: 'open & shut.png', escape: false # # => # # The tag builder respects # {HTML5 void elements}[https://www.w3.org/TR/html5/syntax.html#void-elements] # if no content is passed, and omits closing tags for those elements. # # # A standard element: # tag.div # =>
    # # # A void element: # tag.br # =>
    # # Note that when using the block form options should be wrapped in # parenthesis. # # <%= tag.a(href: "/about", class: "font-bold") do %> # About the author # <% end %> # # => About the author # # === Building HTML attributes # # Transforms a Hash into HTML attributes, ready to be interpolated into # ERB. Includes or omits boolean attributes based on their truthiness. # Transforms keys nested within # aria: or data: objects into aria- and data- # prefixed attributes: # # > # # => # # # # => # # === Legacy syntax # # The following format is for legacy syntax support. It will be deprecated in future versions of \Rails. # # tag(name, options = nil, open = false, escape = true) # # It returns an empty HTML tag of type +name+ which by default is XHTML # compliant. Set +open+ to true to create an open tag compatible # with HTML 4.0 and below. Add HTML attributes by passing an attributes # hash to +options+. Set +escape+ to false to disable attribute value # escaping. # # ==== Options # # You can use symbols or strings for the attribute names. # # Use +true+ with boolean attributes that can render with no value, like # +disabled+ and +readonly+. # # HTML5 data-* attributes can be set with a single +data+ key # pointing to a hash of sub-attributes. # # ==== Examples # # tag("br") # # =>
    # # tag("br", nil, true) # # =>
    # # tag("input", type: 'text', disabled: true) # # => # # tag("input", type: 'text', class: ["strong", "highlight"]) # # => # # tag("img", src: "open & shut.png") # # => # # tag("img", { src: "open & shut.png" }, false, false) # # => # # tag("div", data: { name: 'Stephen', city_state: %w(Chicago IL) }) # # =>
    # # tag("div", class: { highlight: current_user.admin? }) # # =>
    # # source://actionview//lib/action_view/helpers/tag_helper.rb#479 def tag(name = T.unsafe(nil), options = T.unsafe(nil), open = T.unsafe(nil), escape = T.unsafe(nil)); end # Returns a string of tokens built from +args+. # # ==== Examples # token_list("foo", "bar") # # => "foo bar" # token_list("foo", "foo bar") # # => "foo bar" # token_list({ foo: true, bar: false }) # # => "foo" # token_list(nil, false, 123, "", "foo", { bar: true }) # # => "123 foo bar" # # source://actionview//lib/action_view/helpers/tag_helper.rb#538 def token_list(*args); end private # source://actionview//lib/action_view/helpers/tag_helper.rb#580 def build_tag_values(*args); end # @raise [ArgumentError] # # source://actionview//lib/action_view/helpers/tag_helper.rb#575 def ensure_valid_html5_tag_name(name); end # source://actionview//lib/action_view/helpers/tag_helper.rb#600 def tag_builder; end class << self # source://actionview//lib/action_view/helpers/tag_helper.rb#580 def build_tag_values(*args); end # @raise [ArgumentError] # # source://actionview//lib/action_view/helpers/tag_helper.rb#575 def ensure_valid_html5_tag_name(name); end end end # source://actionview//lib/action_view/helpers/tag_helper.rb#33 ActionView::Helpers::TagHelper::ARIA_PREFIXES = T.let(T.unsafe(nil), Set) # source://actionview//lib/action_view/helpers/tag_helper.rb#20 ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES = T.let(T.unsafe(nil), Set) # source://actionview//lib/action_view/helpers/tag_helper.rb#34 ActionView::Helpers::TagHelper::DATA_PREFIXES = T.let(T.unsafe(nil), Set) # source://actionview//lib/action_view/helpers/tag_helper.rb#42 ActionView::Helpers::TagHelper::PRE_CONTENT_STRINGS = T.let(T.unsafe(nil), Hash) # source://actionview//lib/action_view/helpers/tag_helper.rb#36 ActionView::Helpers::TagHelper::TAG_TYPES = T.let(T.unsafe(nil), Hash) # source://actionview//lib/action_view/helpers/tag_helper.rb#46 class ActionView::Helpers::TagHelper::TagBuilder include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper # @return [TagBuilder] a new instance of TagBuilder # # source://actionview//lib/action_view/helpers/tag_helper.rb#216 def initialize(view_context); end # source://actionview//lib/action_view/helpers/tag_helper.rb#112 def a(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#113 def abbr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#114 def address(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#98 def animate(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#99 def animate_motion(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#100 def animate_transform(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#84 def area(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#115 def article(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#116 def aside(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # Transforms a Hash into HTML Attributes, ready to be interpolated into # ERB. # # > # # => # # source://actionview//lib/action_view/helpers/tag_helper.rb#225 def attributes(attributes); end # source://actionview//lib/action_view/helpers/tag_helper.rb#117 def audio(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#118 def b(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#85 def base(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#119 def bdi(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#120 def bdo(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#121 def blockquote(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#122 def body(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#290 def boolean_tag_option(key); end # source://actionview//lib/action_view/helpers/tag_helper.rb#86 def br(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#123 def button(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#124 def canvas(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#125 def caption(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#101 def circle(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#126 def cite(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#127 def code(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#87 def col(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#128 def colgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#239 def content_tag_string(name, content, options, escape = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/tag_helper.rb#129 def data(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#130 def datalist(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#131 def dd(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#132 def del(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#133 def details(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#134 def dfn(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#135 def dialog(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#136 def div(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#137 def dl(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#138 def dt(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#102 def ellipse(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#139 def em(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#88 def embed(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#140 def fieldset(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#141 def figcaption(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#142 def figure(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#143 def footer(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#144 def form(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#145 def h1(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#146 def h2(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#147 def h3(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#148 def h4(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#149 def h5(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#150 def h6(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#151 def head(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#152 def header(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#153 def hgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#89 def hr(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#154 def html(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#155 def i(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#156 def iframe(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#90 def img(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#91 def input(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#157 def ins(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#158 def kbd(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#92 def keygen(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#159 def label(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#160 def legend(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#161 def li(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#103 def line(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#93 def link(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#162 def main(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#163 def map(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#164 def mark(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#165 def menu(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#94 def meta(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#166 def meter(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#167 def nav(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#168 def noscript(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#169 def object(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#170 def ol(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#171 def optgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#172 def option(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#173 def output(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#174 def p(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#104 def path(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#175 def picture(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#105 def polygon(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#106 def polyline(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#176 def portal(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#177 def pre(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#178 def progress(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#179 def q(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#107 def rect(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#180 def rp(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#181 def rt(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#182 def ruby(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#183 def s(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#184 def samp(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#185 def script(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#186 def search(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#187 def section(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#188 def select(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#235 def self_closing_tag_string(name, options, escape = T.unsafe(nil), tag_suffix = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/tag_helper.rb#108 def set(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#189 def slot(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#190 def small(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#95 def source(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#191 def span(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#109 def stop(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#192 def strong(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#193 def style(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#194 def sub(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#195 def summary(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#196 def sup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#197 def table(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#294 def tag_option(key, value, escape); end # source://actionview//lib/action_view/helpers/tag_helper.rb#248 def tag_options(options, escape = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/tag_helper.rb#229 def tag_string(name, content = T.unsafe(nil), options, escape: T.unsafe(nil), &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#198 def tbody(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#199 def td(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#200 def template(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#201 def textarea(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#202 def tfoot(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#203 def th(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#204 def thead(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#205 def time(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#206 def title(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#207 def tr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#96 def track(escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#208 def u(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#209 def ul(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#110 def use(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#210 def var(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#211 def video(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#111 def view(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#97 def wbr(escape: T.unsafe(nil), **options, &block); end private # source://actionview//lib/action_view/helpers/tag_helper.rb#324 def method_missing(called, *args, escape: T.unsafe(nil), **options, &block); end # source://actionview//lib/action_view/helpers/tag_helper.rb#312 def prefix_tag_option(prefix, key, value, escape); end # @return [Boolean] # # source://actionview//lib/action_view/helpers/tag_helper.rb#320 def respond_to_missing?(*args); end class << self # source://actionview//lib/action_view/helpers/tag_helper.rb#50 def define_element(name, code_generator:, method_name: T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/tag_helper.rb#70 def define_self_closing_element(name, code_generator:, method_name: T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/tag_helper.rb#61 def define_void_element(name, code_generator:, method_name: T.unsafe(nil)); end end end # source://actionview//lib/action_view/helpers/tags.rb#5 module ActionView::Helpers::Tags extend ::ActiveSupport::Autoload end # source://actionview//lib/action_view/helpers/tags/base.rb#6 class ActionView::Helpers::Tags::Base include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper include ::ActionView::Helpers::ContentExfiltrationPreventionHelper include ::ActionView::Helpers::UrlHelper include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::TextHelper include ::ActionView::Helpers::FormTagHelper include ::ActionView::Helpers::ActiveModelInstanceTag extend ::ActionView::Helpers::UrlHelper::ClassMethods extend ::ActionView::Helpers::SanitizeHelper::ClassMethods # @return [Base] a new instance of Base # # source://actionview//lib/action_view/helpers/tags/base.rb#11 def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end # Returns the value of attribute object. # # source://actionview//lib/action_view/helpers/tags/base.rb#9 def object; end # This is what child classes implement. # # @raise [NotImplementedError] # # source://actionview//lib/action_view/helpers/tags/base.rb#31 def render; end private # source://actionview//lib/action_view/helpers/tags/base.rb#96 def add_default_name_and_id(options); end # source://actionview//lib/action_view/helpers/tags/base.rb#83 def add_default_name_and_id_for_value(tag_value, options); end # @return [Boolean] # # source://actionview//lib/action_view/helpers/tags/base.rb#132 def generate_ids?; end # source://actionview//lib/action_view/helpers/tags/base.rb#124 def name_and_id_index(options); end # source://actionview//lib/action_view/helpers/tags/base.rb#74 def retrieve_autoindex(pre_match); end # source://actionview//lib/action_view/helpers/tags/base.rb#63 def retrieve_object(object); end # source://actionview//lib/action_view/helpers/tags/base.rb#116 def sanitized_method_name; end # source://actionview//lib/action_view/helpers/tags/base.rb#120 def sanitized_value(value); end # source://actionview//lib/action_view/helpers/tags/base.rb#112 def tag_id(index = T.unsafe(nil), namespace = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/tags/base.rb#108 def tag_name(multiple = T.unsafe(nil), index = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/tags/base.rb#36 def value; end # source://actionview//lib/action_view/helpers/tags/base.rb#46 def value_before_type_cast; end # @return [Boolean] # # source://actionview//lib/action_view/helpers/tags/base.rb#58 def value_came_from_user?; end end # source://actionview//lib/action_view/helpers/tags/check_box.rb#8 class ActionView::Helpers::Tags::CheckBox < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::Checkable # @return [CheckBox] a new instance of CheckBox # # source://actionview//lib/action_view/helpers/tags/check_box.rb#11 def initialize(object_name, method_name, template_object, checked_value, unchecked_value, options); end # source://actionview//lib/action_view/helpers/tags/check_box.rb#17 def render; end private # @return [Boolean] # # source://actionview//lib/action_view/helpers/tags/check_box.rb#42 def checked?(value); end # source://actionview//lib/action_view/helpers/tags/check_box.rb#59 def hidden_field_for_checkbox(options); end end # source://actionview//lib/action_view/helpers/tags/checkable.rb#6 module ActionView::Helpers::Tags::Checkable # @return [Boolean] # # source://actionview//lib/action_view/helpers/tags/checkable.rb#7 def input_checked?(options); end end # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#8 class ActionView::Helpers::Tags::CollectionCheckBoxes < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::CollectionHelpers include ::ActionView::Helpers::FormOptionsHelper # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#22 def render(&block); end private # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#31 def hidden_field_name; end # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#27 def render_component(builder); end end # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#12 class ActionView::Helpers::Tags::CollectionCheckBoxes::CheckBoxBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#13 def check_box(extra_html_options = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#13 def checkbox(extra_html_options = T.unsafe(nil)); end end # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#6 module ActionView::Helpers::Tags::CollectionHelpers # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#30 def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options); end private # Generate default options for collection helpers, such as :checked and # :disabled. # # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#47 def default_html_options_for_collection(item, value); end # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#107 def hidden_field; end # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#112 def hidden_field_name; end # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#40 def instantiate_builder(builder_class, item, value, text, html_options); end # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#75 def render_collection; end # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#86 def render_collection_for(builder_class, &block); end # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#71 def sanitize_attribute_name(value); end end # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#7 class ActionView::Helpers::Tags::CollectionHelpers::Builder # @return [Builder] a new instance of Builder # # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#10 def initialize(template_object, object_name, method_name, object, sanitized_attribute_name, text, value, input_html_options); end # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#22 def label(label_html_options = T.unsafe(nil), &block); end # Returns the value of attribute object. # # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 def object; end # Returns the value of attribute text. # # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 def text; end # Returns the value of attribute value. # # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 def value; end end # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#8 class ActionView::Helpers::Tags::CollectionRadioButtons < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::CollectionHelpers include ::ActionView::Helpers::FormOptionsHelper # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#20 def render(&block); end private # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#25 def render_component(builder); end end # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#12 class ActionView::Helpers::Tags::CollectionRadioButtons::RadioButtonBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#13 def radio_button(extra_html_options = T.unsafe(nil)); end end # source://actionview//lib/action_view/helpers/tags/collection_select.rb#6 class ActionView::Helpers::Tags::CollectionSelect < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::SelectRenderer include ::ActionView::Helpers::FormOptionsHelper # @return [CollectionSelect] a new instance of CollectionSelect # # source://actionview//lib/action_view/helpers/tags/collection_select.rb#10 def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options); end # source://actionview//lib/action_view/helpers/tags/collection_select.rb#19 def render; end end # source://actionview//lib/action_view/helpers/tags/color_field.rb#6 class ActionView::Helpers::Tags::ColorField < ::ActionView::Helpers::Tags::TextField # source://actionview//lib/action_view/helpers/tags/color_field.rb#7 def render; end private # source://actionview//lib/action_view/helpers/tags/color_field.rb#15 def validate_color_string(string); end end # source://actionview//lib/action_view/helpers/tags/date_field.rb#6 class ActionView::Helpers::Tags::DateField < ::ActionView::Helpers::Tags::DatetimeField private # source://actionview//lib/action_view/helpers/tags/date_field.rb#8 def format_datetime(value); end end # source://actionview//lib/action_view/helpers/tags/date_select.rb#8 class ActionView::Helpers::Tags::DateSelect < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::SelectRenderer # @return [DateSelect] a new instance of DateSelect # # source://actionview//lib/action_view/helpers/tags/date_select.rb#11 def initialize(object_name, method_name, template_object, options, html_options); end # source://actionview//lib/action_view/helpers/tags/date_select.rb#17 def render; end private # source://actionview//lib/action_view/helpers/tags/date_select.rb#32 def datetime_selector(options, html_options); end # source://actionview//lib/action_view/helpers/tags/date_select.rb#45 def default_datetime(options); end # source://actionview//lib/action_view/helpers/tags/date_select.rb#28 def select_type; end class << self # source://actionview//lib/action_view/helpers/tags/date_select.rb#22 def select_type; end end end # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#6 class ActionView::Helpers::Tags::DatetimeField < ::ActionView::Helpers::Tags::TextField # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#7 def render; end private # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#17 def datetime_value(value); end # @raise [NotImplementedError] # # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#25 def format_datetime(value); end # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#29 def parse_datetime(value); end end # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#6 class ActionView::Helpers::Tags::DatetimeLocalField < ::ActionView::Helpers::Tags::DatetimeField # @return [DatetimeLocalField] a new instance of DatetimeLocalField # # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#7 def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end private # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#19 def format_datetime(value); end class << self # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#13 def field_type; end end end # source://actionview//lib/action_view/helpers/tags/datetime_select.rb#6 class ActionView::Helpers::Tags::DatetimeSelect < ::ActionView::Helpers::Tags::DateSelect; end # source://actionview//lib/action_view/helpers/tags/email_field.rb#6 class ActionView::Helpers::Tags::EmailField < ::ActionView::Helpers::Tags::TextField; end # source://actionview//lib/action_view/helpers/tags/file_field.rb#6 class ActionView::Helpers::Tags::FileField < ::ActionView::Helpers::Tags::TextField # source://actionview//lib/action_view/helpers/tags/file_field.rb#7 def render; end private # source://actionview//lib/action_view/helpers/tags/file_field.rb#20 def hidden_field_for_multiple_file(options); end end # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#6 class ActionView::Helpers::Tags::GroupedCollectionSelect < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::SelectRenderer include ::ActionView::Helpers::FormOptionsHelper # @return [GroupedCollectionSelect] a new instance of GroupedCollectionSelect # # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#10 def initialize(object_name, method_name, template_object, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options); end # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#21 def render; end end # source://actionview//lib/action_view/helpers/tags/hidden_field.rb#6 class ActionView::Helpers::Tags::HiddenField < ::ActionView::Helpers::Tags::TextField # source://actionview//lib/action_view/helpers/tags/hidden_field.rb#7 def render; end end # source://actionview//lib/action_view/helpers/tags/label.rb#6 class ActionView::Helpers::Tags::Label < ::ActionView::Helpers::Tags::Base # @return [Label] a new instance of Label # # source://actionview//lib/action_view/helpers/tags/label.rb#34 def initialize(object_name, method_name, template_object, content_or_options = T.unsafe(nil), options = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/tags/label.rb#48 def render(&block); end private # source://actionview//lib/action_view/helpers/tags/label.rb#78 def render_component(builder); end end # source://actionview//lib/action_view/helpers/tags/label.rb#7 class ActionView::Helpers::Tags::Label::LabelBuilder # @return [LabelBuilder] a new instance of LabelBuilder # # source://actionview//lib/action_view/helpers/tags/label.rb#10 def initialize(template_object, object_name, method_name, object, tag_value); end # Returns the value of attribute object. # # source://actionview//lib/action_view/helpers/tags/label.rb#8 def object; end # source://actionview//lib/action_view/helpers/tags/label.rb#29 def to_s; end # source://actionview//lib/action_view/helpers/tags/label.rb#18 def translation; end end # source://actionview//lib/action_view/helpers/tags/month_field.rb#6 class ActionView::Helpers::Tags::MonthField < ::ActionView::Helpers::Tags::DatetimeField private # source://actionview//lib/action_view/helpers/tags/month_field.rb#8 def format_datetime(value); end end # source://actionview//lib/action_view/helpers/tags/number_field.rb#6 class ActionView::Helpers::Tags::NumberField < ::ActionView::Helpers::Tags::TextField # source://actionview//lib/action_view/helpers/tags/number_field.rb#7 def render; end end # source://actionview//lib/action_view/helpers/tags/password_field.rb#6 class ActionView::Helpers::Tags::PasswordField < ::ActionView::Helpers::Tags::TextField # source://actionview//lib/action_view/helpers/tags/password_field.rb#7 def render; end end # source://actionview//lib/action_view/helpers/tags/placeholderable.rb#6 module ActionView::Helpers::Tags::Placeholderable # source://actionview//lib/action_view/helpers/tags/placeholderable.rb#7 def initialize(*_arg0); end end # source://actionview//lib/action_view/helpers/tags/radio_button.rb#8 class ActionView::Helpers::Tags::RadioButton < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::Checkable # @return [RadioButton] a new instance of RadioButton # # source://actionview//lib/action_view/helpers/tags/radio_button.rb#11 def initialize(object_name, method_name, template_object, tag_value, options); end # source://actionview//lib/action_view/helpers/tags/radio_button.rb#16 def render; end private # @return [Boolean] # # source://actionview//lib/action_view/helpers/tags/radio_button.rb#26 def checked?(value); end end # source://actionview//lib/action_view/helpers/tags/range_field.rb#6 class ActionView::Helpers::Tags::RangeField < ::ActionView::Helpers::Tags::NumberField; end # source://actionview//lib/action_view/helpers/tags/search_field.rb#6 class ActionView::Helpers::Tags::SearchField < ::ActionView::Helpers::Tags::TextField # source://actionview//lib/action_view/helpers/tags/search_field.rb#7 def render; end end # source://actionview//lib/action_view/helpers/tags/select.rb#6 class ActionView::Helpers::Tags::Select < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::SelectRenderer include ::ActionView::Helpers::FormOptionsHelper # @return [Select] a new instance of Select # # source://actionview//lib/action_view/helpers/tags/select.rb#10 def initialize(object_name, method_name, template_object, choices, options, html_options); end # source://actionview//lib/action_view/helpers/tags/select.rb#19 def render; end private # Grouped choices look like this: # # [nil, []] # { nil => [] } # # @return [Boolean] # # source://actionview//lib/action_view/helpers/tags/select.rb#39 def grouped_choices?; end end # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#6 module ActionView::Helpers::Tags::SelectRenderer private # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#36 def add_options(option_tags, options, value = T.unsafe(nil)); end # @return [Boolean] # # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#31 def placeholder_required?(html_options); end # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#8 def select_content_tag(option_tags, options, html_options); end end # source://actionview//lib/action_view/helpers/tags/tel_field.rb#6 class ActionView::Helpers::Tags::TelField < ::ActionView::Helpers::Tags::TextField; end # source://actionview//lib/action_view/helpers/tags/text_area.rb#8 class ActionView::Helpers::Tags::TextArea < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::Placeholderable # source://actionview//lib/action_view/helpers/tags/text_area.rb#11 def render; end end # source://actionview//lib/action_view/helpers/tags/text_field.rb#8 class ActionView::Helpers::Tags::TextField < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::Placeholderable # source://actionview//lib/action_view/helpers/tags/text_field.rb#11 def render; end private # source://actionview//lib/action_view/helpers/tags/text_field.rb#27 def field_type; end class << self # source://actionview//lib/action_view/helpers/tags/text_field.rb#21 def field_type; end end end # source://actionview//lib/action_view/helpers/tags/time_field.rb#6 class ActionView::Helpers::Tags::TimeField < ::ActionView::Helpers::Tags::DatetimeField # @return [TimeField] a new instance of TimeField # # source://actionview//lib/action_view/helpers/tags/time_field.rb#7 def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end private # source://actionview//lib/action_view/helpers/tags/time_field.rb#13 def format_datetime(value); end end # source://actionview//lib/action_view/helpers/tags/time_select.rb#6 class ActionView::Helpers::Tags::TimeSelect < ::ActionView::Helpers::Tags::DateSelect; end # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#6 class ActionView::Helpers::Tags::TimeZoneSelect < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::SelectRenderer include ::ActionView::Helpers::FormOptionsHelper # @return [TimeZoneSelect] a new instance of TimeZoneSelect # # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#10 def initialize(object_name, method_name, template_object, priority_zones, options, html_options); end # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#17 def render; end end # source://actionview//lib/action_view/helpers/tags/translator.rb#6 class ActionView::Helpers::Tags::Translator # @return [Translator] a new instance of Translator # # source://actionview//lib/action_view/helpers/tags/translator.rb#7 def initialize(object, object_name, method_and_value, scope:); end # source://actionview//lib/action_view/helpers/tags/translator.rb#14 def translate; end private # source://actionview//lib/action_view/helpers/tags/translator.rb#31 def human_attribute_name; end # source://actionview//lib/action_view/helpers/tags/translator.rb#22 def i18n_default; end # Returns the value of attribute method_and_value. # # source://actionview//lib/action_view/helpers/tags/translator.rb#20 def method_and_value; end # Returns the value of attribute model. # # source://actionview//lib/action_view/helpers/tags/translator.rb#20 def model; end # Returns the value of attribute object_name. # # source://actionview//lib/action_view/helpers/tags/translator.rb#20 def object_name; end # Returns the value of attribute scope. # # source://actionview//lib/action_view/helpers/tags/translator.rb#20 def scope; end end # source://actionview//lib/action_view/helpers/tags/url_field.rb#6 class ActionView::Helpers::Tags::UrlField < ::ActionView::Helpers::Tags::TextField; end # source://actionview//lib/action_view/helpers/tags/week_field.rb#6 class ActionView::Helpers::Tags::WeekField < ::ActionView::Helpers::Tags::DatetimeField private # source://actionview//lib/action_view/helpers/tags/week_field.rb#8 def format_datetime(value); end end # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#6 class ActionView::Helpers::Tags::WeekdaySelect < ::ActionView::Helpers::Tags::Base include ::ActionView::Helpers::Tags::SelectRenderer include ::ActionView::Helpers::FormOptionsHelper # @return [WeekdaySelect] a new instance of WeekdaySelect # # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#10 def initialize(object_name, method_name, template_object, options, html_options); end # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#16 def render; end end # = Action View Text \Helpers # # The TextHelper module provides a set of methods for filtering, formatting # and transforming strings, which can reduce the amount of inline Ruby code in # your views. These helper methods extend Action View making them callable # within your template files. # # ==== Sanitization # # Most text helpers that generate HTML output sanitize the given input by default, # but do not escape it. This means HTML tags will appear in the page but all malicious # code will be removed. Let's look at some examples using the +simple_format+ method: # # simple_format('Example') # # => "

    Example

    " # # simple_format('Example') # # => "

    Example

    " # # If you want to escape all content, you should invoke the +h+ method before # calling the text helper. # # simple_format h('Example') # # => "

    <a href=\"http://example.com/\">Example</a>

    " # # source://actionview//lib/action_view/helpers/text_helper.rb#36 module ActionView::Helpers::TextHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper extend ::ActiveSupport::Concern include ::ActionView::Helpers::SanitizeHelper mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods # The preferred method of outputting text in your views is to use the # <%= "text" %> eRuby syntax. The regular +puts+ and +print+ methods # do not operate as expected in an eRuby code block. If you absolutely must # output text within a non-output code block (i.e., <% %>), you # can use the +concat+ method. # # <% concat "hello" %> is equivalent to <%= "hello" %> # # <% # unless signed_in? # concat link_to("Sign In", action: :sign_in) # end # %> # # is equivalent to # # <% unless signed_in? %> # <%= link_to "Sign In", action: :sign_in %> # <% end %> # # source://actionview//lib/action_view/helpers/text_helper.rb#63 def concat(string); end # Returns the current cycle string after a cycle has been started. Useful # for complex table highlighting or any other design need which requires # the current cycle string in more than one place. # # <%# Alternate background colors %> # <% @items = [1,2,3,4] %> # <% @items.each do |item| %> #
    "> # <%= item %> #
    # <% end %> # # source://actionview//lib/action_view/helpers/text_helper.rb#454 def current_cycle(name = T.unsafe(nil)); end # Creates a Cycle object whose +to_s+ method cycles through elements of an # array every time it is called. This can be used for example, to alternate # classes for table rows. You can use named cycles to allow nesting in loops. # Passing a Hash as the last parameter with a :name key will create a # named cycle. The default name for a cycle without a +:name+ key is # "default". You can manually reset a cycle by calling reset_cycle # and passing the name of the cycle. The current cycle string can be obtained # anytime using the current_cycle method. # # <%# Alternate CSS classes for even and odd numbers... %> # <% @items = [1,2,3,4] %> # # <% @items.each do |item| %> # "> # # # <% end %> #
    <%= item %>
    # # # <%# Cycle CSS classes for rows, and text colors for values within each row %> # <% @items = [ # { first: "Robert", middle: "Daniel", last: "James" }, # { first: "Emily", middle: "Shannon", maiden: "Pike", last: "Hicks" }, # { first: "June", middle: "Dae", last: "Jones" }, # ] %> # <% @items.each do |item| %> # "> # # <% item.values.each do |value| %> # <%# Create a named cycle "colors" %> # "> # <%= value %> # # <% end %> # <% reset_cycle("colors") %> # # # <% end %> # # source://actionview//lib/action_view/helpers/text_helper.rb#430 def cycle(first_value, *values); end # Extracts the first occurrence of +phrase+ plus surrounding text from # +text+. An omission marker is prepended / appended if the start / end of # the result does not coincide with the start / end of +text+. The result # is always stripped in any case. Returns +nil+ if +phrase+ isn't found. # # ==== Options # # [+:radius+] # The number of characters (or tokens — see +:separator+ option) around # +phrase+ to include in the result. Defaults to 100. # # [+:omission+] # The marker to prepend / append when the start / end of the excerpt # does not coincide with the start / end of +text+. Defaults to # "...". # # [+:separator+] # The separator between tokens to count for +:radius+. Defaults to # "", which treats each character as a token. # # ==== Examples # # excerpt('This is an example', 'an', radius: 5) # # => "...s is an exam..." # # excerpt('This is an example', 'is', radius: 5) # # => "This is a..." # # excerpt('This is an example', 'is') # # => "This is an example" # # excerpt('This next thing is an example', 'ex', radius: 2) # # => "...next..." # # excerpt('This is also an example', 'an', radius: 8, omission: ' ') # # => " is also an example" # # excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1) # # => "...a very beautiful..." # # source://actionview//lib/action_view/helpers/text_helper.rb#235 def excerpt(text, phrase, options = T.unsafe(nil)); end # Highlights occurrences of +phrases+ in +text+ by formatting them with a # highlighter string. +phrases+ can be one or more strings or regular # expressions. The result will be marked HTML safe. By default, +text+ is # sanitized before highlighting to prevent possible XSS attacks. # # If a block is specified, it will be used instead of the highlighter # string. Each occurrence of a phrase will be passed to the block, and its # return value will be inserted into the final result. # # ==== Options # # [+:highlighter+] # The highlighter string. Uses \1 as the placeholder for a # phrase, similar to +String#sub+. Defaults to "\1". # This option is ignored if a block is specified. # # [+:sanitize+] # Whether to sanitize +text+ before highlighting. Defaults to true. # # ==== Examples # # highlight('You searched for: rails', 'rails') # # => "You searched for: rails" # # highlight('You searched for: rails', /for|rails/) # # => "You searched for: rails" # # highlight('You searched for: ruby, rails, dhh', 'actionpack') # # => "You searched for: ruby, rails, dhh" # # highlight('You searched for: rails', ['for', 'rails'], highlighter: '\1') # # => "You searched for: rails" # # highlight('You searched for: rails', 'rails', highlighter: '\1') # # => "You searched for: rails" # # highlight('You searched for: rails', 'rails') { |match| link_to(search_path(q: match)) } # # => "You searched for: rails" # # highlight('ruby on rails', 'rails', sanitize: false) # # => "ruby on rails" # # source://actionview//lib/action_view/helpers/text_helper.rb#174 def highlight(text, phrases, options = T.unsafe(nil), &block); end # Attempts to pluralize the +singular+ word unless +count+ is 1. If # +plural+ is supplied, it will use that when count is > 1, otherwise # it will use the Inflector to determine the plural form for the given locale, # which defaults to +I18n.locale+. # # The word will be pluralized using rules defined for the locale # (you must define your own inflection rules for languages other than English). # See ActiveSupport::Inflector.pluralize # # pluralize(1, 'person') # # => "1 person" # # pluralize(2, 'person') # # => "2 people" # # pluralize(3, 'person', plural: 'users') # # => "3 users" # # pluralize(0, 'person') # # => "0 people" # # pluralize(2, 'Person', locale: :de) # # => "2 Personen" # # source://actionview//lib/action_view/helpers/text_helper.rb#290 def pluralize(count, singular, plural_arg = T.unsafe(nil), plural: T.unsafe(nil), locale: T.unsafe(nil)); end # Resets a cycle so that it starts from the first element the next time # it is called. Pass in +name+ to reset a named cycle. # # <%# Alternate CSS classes for even and odd numbers... %> # <% @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]] %> # # <% @items.each do |item| %> # "> # <% item.each do |value| %> # "> # <%= value %> # # <% end %> # # <% reset_cycle("colors") %> # # <% end %> #
    # # source://actionview//lib/action_view/helpers/text_helper.rb#477 def reset_cycle(name = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/text_helper.rb#67 def safe_concat(string); end # Returns +text+ transformed into HTML using simple formatting rules. # Two or more consecutive newlines (\n\n or \r\n\r\n) are # considered a paragraph and wrapped in

    tags. One newline # (\n or \r\n) is considered a linebreak and a #
    tag is appended. This method does not remove the # newlines from the +text+. # # You can pass any HTML attributes into html_options. These # will be added to all created paragraphs. # # ==== Options # * :sanitize - If +false+, does not sanitize +text+. # * :sanitize_options - Any extra options you want appended to the sanitize. # * :wrapper_tag - String representing the wrapper tag, defaults to "p" # # ==== Examples # my_text = "Here is some basic text...\n...with a line break." # # simple_format(my_text) # # => "

    Here is some basic text...\n
    ...with a line break.

    " # # simple_format(my_text, {}, wrapper_tag: "div") # # => "
    Here is some basic text...\n
    ...with a line break.
    " # # more_text = "We want to put a paragraph...\n\n...right there." # # simple_format(more_text) # # => "

    We want to put a paragraph...

    \n\n

    ...right there.

    " # # simple_format("Look ma! A class!", class: 'description') # # => "

    Look ma! A class!

    " # # simple_format("Unblinkable.") # # => "

    Unblinkable.

    " # # simple_format("Blinkable! It's true.", {}, sanitize: false) # # => "

    Blinkable! It's true.

    " # # simple_format("Continue", {}, { sanitize_options: { attributes: %w[target href] } }) # # => "

    Continue

    " # # source://actionview//lib/action_view/helpers/text_helper.rb#376 def simple_format(text, html_options = T.unsafe(nil), options = T.unsafe(nil)); end # Truncates +text+ if it is longer than a specified +:length+. If +text+ # is truncated, an omission marker will be appended to the result for a # total length not exceeding +:length+. # # You can also pass a block to render and append extra content after the # omission marker when +text+ is truncated. However, this content _can_ # cause the total length to exceed +:length+ characters. # # The result will be escaped unless escape: false is specified. # In any case, the result will be marked HTML-safe. Care should be taken # if +text+ might contain HTML tags or entities, because truncation could # produce invalid HTML, such as unbalanced or incomplete tags. # # ==== Options # # [+:length+] # The maximum number of characters that should be returned, excluding # any extra content from the block. Defaults to 30. # # [+:omission+] # The string to append after truncating. Defaults to "...". # # [+:separator+] # A string or regexp used to find a breaking point at which to truncate. # By default, truncation can occur at any character in +text+. # # [+:escape+] # Whether to escape the result. Defaults to true. # # ==== Examples # # truncate("Once upon a time in a world far far away") # # => "Once upon a time in a world..." # # truncate("Once upon a time in a world far far away", length: 17) # # => "Once upon a ti..." # # truncate("Once upon a time in a world far far away", length: 17, separator: ' ') # # => "Once upon a..." # # truncate("And they found that many people were sleeping better.", length: 25, omission: '... (continued)') # # => "And they f... (continued)" # # truncate("

    Once upon a time in a world far far away

    ") # # => "<p>Once upon a time in a wo..." # # truncate("

    Once upon a time in a world far far away

    ", escape: false) # # => "

    Once upon a time in a wo..." # # truncate("Once upon a time in a world far far away") { link_to "Continue", "#" } # # => "Once upon a time in a world...Continue" # # source://actionview//lib/action_view/helpers/text_helper.rb#122 def truncate(text, options = T.unsafe(nil), &block); end # Wraps the +text+ into lines no longer than +line_width+ width. This method # breaks on the first whitespace character that does not exceed +line_width+ # (which is 80 by default). # # word_wrap('Once upon a time') # # => "Once upon a time" # # word_wrap('Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding a successor to the throne turned out to be more trouble than anyone could have imagined...') # # => "Once upon a time, in a kingdom called Far Far Away, a king fell ill, and finding\na successor to the throne turned out to be more trouble than anyone could have\nimagined..." # # word_wrap('Once upon a time', line_width: 8) # # => "Once\nupon a\ntime" # # word_wrap('Once upon a time', line_width: 1) # # => "Once\nupon\na\ntime" # # You can also specify a custom +break_sequence+ ("\n" by default): # # word_wrap('Once upon a time', line_width: 1, break_sequence: "\r\n") # # => "Once\r\nupon\r\na\r\ntime" # # source://actionview//lib/action_view/helpers/text_helper.rb#320 def word_wrap(text, line_width: T.unsafe(nil), break_sequence: T.unsafe(nil)); end private # source://actionview//lib/action_view/helpers/text_helper.rb#540 def cut_excerpt_part(part_position, part, separator, options); end # The cycle helpers need to store the cycles in a place that is # guaranteed to be reset every time a page is rendered, so it # uses an instance variable of ActionView::Base. # # source://actionview//lib/action_view/helpers/text_helper.rb#522 def get_cycle(name); end # source://actionview//lib/action_view/helpers/text_helper.rb#527 def set_cycle(name, cycle_object); end # source://actionview//lib/action_view/helpers/text_helper.rb#532 def split_paragraphs(text); end end # source://actionview//lib/action_view/helpers/text_helper.rb#482 class ActionView::Helpers::TextHelper::Cycle # @return [Cycle] a new instance of Cycle # # source://actionview//lib/action_view/helpers/text_helper.rb#485 def initialize(first_value, *values); end # source://actionview//lib/action_view/helpers/text_helper.rb#494 def current_value; end # source://actionview//lib/action_view/helpers/text_helper.rb#490 def reset; end # source://actionview//lib/action_view/helpers/text_helper.rb#498 def to_s; end # Returns the value of attribute values. # # source://actionview//lib/action_view/helpers/text_helper.rb#483 def values; end private # source://actionview//lib/action_view/helpers/text_helper.rb#505 def next_index; end # source://actionview//lib/action_view/helpers/text_helper.rb#509 def previous_index; end # source://actionview//lib/action_view/helpers/text_helper.rb#513 def step_index(n); end end # = Action View Translation \Helpers # # source://actionview//lib/action_view/helpers/translation_helper.rb#9 module ActionView::Helpers::TranslationHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper extend ::ActiveSupport::Concern # Delegates to I18n.localize with no additional functionality. # # See https://www.rubydoc.info/gems/i18n/I18n/Backend/Base:localize # for more information. # # source://actionview//lib/action_view/helpers/translation_helper.rb#116 def l(object, **options); end # Delegates to I18n.localize with no additional functionality. # # See https://www.rubydoc.info/gems/i18n/I18n/Backend/Base:localize # for more information. # # source://actionview//lib/action_view/helpers/translation_helper.rb#116 def localize(object, **options); end # Delegates to I18n#translate but also performs three additional # functions. # # First, it will ensure that any thrown +MissingTranslation+ messages will # be rendered as inline spans that: # # * Have a translation-missing class applied # * Contain the missing key as the value of the +title+ attribute # * Have a titleized version of the last key segment as text # # For example, the value returned for the missing translation key # "blog.post.title" will be: # # Title # # This allows for views to display rather reasonable strings while still # giving developers a way to find missing translations. # # If you would prefer missing translations to raise an error, you can # opt out of span-wrapping behavior globally by setting # config.i18n.raise_on_missing_translations = true or # individually by passing raise: true as an option to # translate. # # Second, if the key starts with a period translate will scope # the key by the current partial. Calling translate(".foo") from # the people/index.html.erb template is equivalent to calling # translate("people.index.foo"). This makes it less # repetitive to translate many keys within the same partial and provides # a convention to scope keys consistently. # # Third, the translation will be marked as html_safe if the key # has the suffix "_html" or the last element of the key is "html". Calling # translate("footer_html") or translate("footer.html") # will return an HTML safe string that won't be escaped by other HTML # helper methods. This naming convention helps to identify translations # that include HTML tags so that you know what kind of output to expect # when you call translate in a template and translators know which keys # they can provide HTML values for. # # To access the translated text along with the fully resolved # translation key, translate accepts a block: # # <%= translate(".relative_key") do |translation, resolved_key| %> # <%= translation %> # <% end %> # # This enables annotate translated text to be aware of the scope it was # resolved against. # # source://actionview//lib/action_view/helpers/translation_helper.rb#73 def t(key, **options); end # Delegates to I18n#translate but also performs three additional # functions. # # First, it will ensure that any thrown +MissingTranslation+ messages will # be rendered as inline spans that: # # * Have a translation-missing class applied # * Contain the missing key as the value of the +title+ attribute # * Have a titleized version of the last key segment as text # # For example, the value returned for the missing translation key # "blog.post.title" will be: # # Title # # This allows for views to display rather reasonable strings while still # giving developers a way to find missing translations. # # If you would prefer missing translations to raise an error, you can # opt out of span-wrapping behavior globally by setting # config.i18n.raise_on_missing_translations = true or # individually by passing raise: true as an option to # translate. # # Second, if the key starts with a period translate will scope # the key by the current partial. Calling translate(".foo") from # the people/index.html.erb template is equivalent to calling # translate("people.index.foo"). This makes it less # repetitive to translate many keys within the same partial and provides # a convention to scope keys consistently. # # Third, the translation will be marked as html_safe if the key # has the suffix "_html" or the last element of the key is "html". Calling # translate("footer_html") or translate("footer.html") # will return an HTML safe string that won't be escaped by other HTML # helper methods. This naming convention helps to identify translations # that include HTML tags so that you know what kind of output to expect # when you call translate in a template and translators know which keys # they can provide HTML values for. # # To access the translated text along with the fully resolved # translation key, translate accepts a block: # # <%= translate(".relative_key") do |translation, resolved_key| %> # <%= translation %> # <% end %> # # This enables annotate translated text to be aware of the scope it was # resolved against. # # source://actionview//lib/action_view/helpers/translation_helper.rb#73 def translate(key, **options); end private # source://actionview//lib/action_view/helpers/translation_helper.rb#142 def missing_translation(key, options); end # source://actionview//lib/action_view/helpers/translation_helper.rb#128 def scope_key_by_partial(key); end class << self # source://actionview//lib/action_view/helpers/translation_helper.rb#15 def raise_on_missing_translations; end # source://actionview//lib/action_view/helpers/translation_helper.rb#15 def raise_on_missing_translations=(_arg0); end end end # source://actionview//lib/action_view/helpers/translation_helper.rb#122 ActionView::Helpers::TranslationHelper::MISSING_TRANSLATION = T.let(T.unsafe(nil), Integer) # source://actionview//lib/action_view/helpers/translation_helper.rb#125 ActionView::Helpers::TranslationHelper::NO_DEFAULT = T.let(T.unsafe(nil), Array) # = Action View URL \Helpers # # Provides a set of methods for making links and getting URLs that # depend on the routing subsystem (see ActionDispatch::Routing). # This allows you to use the same format for links in views # and controllers. # # source://actionview//lib/action_view/helpers/url_helper.rb#17 module ActionView::Helpers::UrlHelper include ::ActionView::Helpers::CaptureHelper include ::ActionView::Helpers::OutputSafetyHelper include ::ActionView::Helpers::TagHelper include ::ActionView::Helpers::ContentExfiltrationPreventionHelper extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods # Generates a form containing a single button that submits to the URL created # by the set of +options+. This is the safest method to ensure links that # cause changes to your data are not triggered by search bots or accelerators. # # You can control the form and button behavior with +html_options+. Most # values in +html_options+ are passed through to the button element. For # example, passing a +:class+ option within +html_options+ will set the # class attribute of the button element. # # The class attribute of the form element can be set by passing a # +:form_class+ option within +html_options+. It defaults to # "button_to" to allow styling of the form and its children. # # The form submits a POST request by default if the object is not persisted; # conversely, if the object is persisted, it will submit a PATCH request. # To specify a different HTTP verb use the +:method+ option within +html_options+. # # If the HTML button generated from +button_to+ does not work with your layout, you can # consider using the +link_to+ method with the +data-turbo-method+ # attribute as described in the +link_to+ documentation. # # ==== Options # The +options+ hash accepts the same options as +url_for+. To generate a # element without an [action] attribute, pass # false: # # <%= button_to "New", false %> # # => " # # # # # #

    " # # Most values in +html_options+ are passed through to the button element, # but there are a few special options: # # * :method - \Symbol of HTTP verb. Supported verbs are :post, :get, # :delete, :patch, and :put. By default it will be :post. # * :disabled - If set to true, it will generate a disabled button. # * :data - This option can be used to add custom data attributes. # * :form - This hash will be form attributes # * :form_class - This controls the class of the form within which the submit button will # be placed # * :params - \Hash of parameters to be rendered as hidden fields within the form. # # ==== Examples # <%= button_to "New", action: "new" %> # # => "
    # # # # # #
    " # # <%= button_to "New", new_article_path %> # # => "
    # # # # # #
    " # # <%= button_to "New", new_article_path, params: { time: Time.now } %> # # => "
    # # # # # # # #
    " # # <%= button_to [:make_happy, @user] do %> # Make happy <%= @user.name %> # <% end %> # # => "
    # # # # # #
    " # # <%= button_to "New", { action: "new" }, form_class: "new-thing" %> # # => "
    # # # # # #
    " # # <%= button_to "Create", { action: "create" }, form: { "data-type" => "json" } %> # # => "
    # # # # # #
    " # # source://actionview//lib/action_view/helpers/url_helper.rb#296 def button_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # source://actionview//lib/action_view/helpers/url_helper.rb#35 def button_to_generates_button_tag; end # source://actionview//lib/action_view/helpers/url_helper.rb#35 def button_to_generates_button_tag=(val); end # True if the current request URI was generated by the given +options+. # # ==== Examples # Let's say we're in the http://www.example.com/shop/checkout?order=desc&page=1 action. # # current_page?(action: 'process') # # => false # # current_page?(action: 'checkout') # # => true # # current_page?(controller: 'library', action: 'checkout') # # => false # # current_page?(controller: 'shop', action: 'checkout') # # => true # # current_page?(controller: 'shop', action: 'checkout', order: 'asc') # # => false # # current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '1') # # => true # # current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '2') # # => false # # current_page?('http://www.example.com/shop/checkout') # # => true # # current_page?('http://www.example.com/shop/checkout', check_parameters: true) # # => false # # current_page?('/shop/checkout') # # => true # # current_page?('http://www.example.com/shop/checkout?order=desc&page=1') # # => true # # Let's say we're in the http://www.example.com/products action with method POST in case of invalid product. # # current_page?(controller: 'product', action: 'index') # # => false # # We can also pass in the symbol arguments instead of strings. # # @return [Boolean] # # source://actionview//lib/action_view/helpers/url_helper.rb#548 def current_page?(options = T.unsafe(nil), check_parameters: T.unsafe(nil), **options_as_kwargs); end # Creates an anchor element of the given +name+ using a URL created by the set of +options+. # See the valid options in the documentation for +url_for+. It's also possible to # pass a \String instead of an options hash, which generates an anchor element that uses the # value of the \String as the href for the link. Using a :back \Symbol instead # of an options hash will generate a link to the referrer (a JavaScript back link # will be used in place of a referrer if none exists). If +nil+ is passed as the name # the value of the link itself will become the name. # # ==== Signatures # # link_to(body, url, html_options = {}) # # url is a String; you can use URL helpers like # # posts_path # # link_to(body, url_options = {}, html_options = {}) # # url_options, except :method, is passed to url_for # # link_to(options = {}, html_options = {}) do # # name # end # # link_to(url, html_options = {}) do # # name # end # # link_to(active_record_model) # # ==== Options # * :data - This option can be used to add custom data attributes. # # ==== Examples # # Because it relies on +url_for+, +link_to+ supports both older-style controller/action/id arguments # and newer RESTful routes. Current \Rails style favors RESTful routes whenever possible, so base # your application on resources and use # # link_to "Profile", profile_path(@profile) # # => Profile # # or the even pithier # # link_to "Profile", @profile # # => Profile # # in place of the older more verbose, non-resource-oriented # # link_to "Profile", controller: "profiles", action: "show", id: @profile # # => Profile # # Similarly, # # link_to "Profiles", profiles_path # # => Profiles # # is better than # # link_to "Profiles", controller: "profiles" # # => Profiles # # When name is +nil+ the href is presented instead # # link_to nil, "http://example.com" # # => http://www.example.com # # More concise yet, when +name+ is an Active Record model that defines a # +to_s+ method returning a default value or a model instance attribute # # link_to @profile # # => Eileen # # You can use a block as well if your link target is hard to fit into the name parameter. ERB example: # # <%= link_to(@profile) do %> # <%= @profile.name %> -- Check it out! # <% end %> # # => # David -- Check it out! # # # Classes and ids for CSS are easy to produce: # # link_to "Articles", articles_path, id: "news", class: "article" # # => Articles # # Be careful when using the older argument style, as an extra literal hash is needed: # # link_to "Articles", { controller: "articles" }, id: "news", class: "article" # # => Articles # # Leaving the hash off gives the wrong link: # # link_to "WRONG!", controller: "articles", id: "news", class: "article" # # => WRONG! # # +link_to+ can also produce links with anchors or query strings: # # link_to "Comment wall", profile_path(@profile, anchor: "wall") # # => Comment wall # # link_to "Ruby on Rails search", controller: "searches", query: "ruby on rails" # # => Ruby on Rails search # # link_to "Nonsense search", searches_path(foo: "bar", baz: "quux") # # => Nonsense search # # You can set any link attributes such as target, rel, type: # # link_to "External link", "http://www.rubyonrails.org/", target: "_blank", rel: "nofollow" # # => External link # # ==== Turbo # # Rails 7 ships with Turbo enabled by default. Turbo provides the following +:data+ options: # # * turbo_method: symbol of HTTP verb - Performs a Turbo link visit # with the given HTTP verb. Forms are recommended when performing non-+GET+ requests. # Only use data-turbo-method where a form is not possible. # # * turbo_confirm: "question?" - Adds a confirmation dialog to the link with the # given value. # # {Consult the Turbo Handbook for more information on the options # above.}[https://turbo.hotwired.dev/handbook/drive#performing-visits-with-a-different-method] # # ===== \Examples # # link_to "Delete profile", @profile, data: { turbo_method: :delete } # # => Delete profile # # link_to "Visit Other Site", "https://rubyonrails.org/", data: { turbo_confirm: "Are you sure?" } # # => Visit Other Site # # source://actionview//lib/action_view/helpers/url_helper.rb#198 def link_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of # +options+ if +condition+ is true, otherwise only the name is # returned. To specialize the default behavior, you can pass a block that # accepts the name or the full argument list for +link_to_if+. # # ==== Examples # <%= link_to_if(@current_user.nil?, "Login", { controller: "sessions", action: "new" }) %> # # If the user isn't logged in... # # => Login # # <%= # link_to_if(@current_user.nil?, "Login", { controller: "sessions", action: "new" }) do # link_to(@current_user.login, { controller: "accounts", action: "show", id: @current_user }) # end # %> # # If the user isn't logged in... # # => Login # # If they are logged in... # # => my_username # # source://actionview//lib/action_view/helpers/url_helper.rb#437 def link_to_if(condition, name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of # +options+ unless +condition+ is true, in which case only the name is # returned. To specialize the default behavior (i.e., show a login link rather # than just the plaintext link text), you can pass a block that # accepts the name or the full argument list for +link_to_unless+. # # ==== Examples # <%= link_to_unless(@current_user.nil?, "Reply", { action: "reply" }) %> # # If the user is logged in... # # => Reply # # <%= # link_to_unless(@current_user.nil?, "Reply", { action: "reply" }) do |name| # link_to(name, { controller: "accounts", action: "signup" }) # end # %> # # If the user is logged in... # # => Reply # # If not... # # => Reply # # source://actionview//lib/action_view/helpers/url_helper.rb#414 def link_to_unless(condition, name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a link tag of the given +name+ using a URL created by the set of # +options+ unless the current request URI is the same as the links, in # which case only the name is returned (or the given block is yielded, if # one exists). You can give +link_to_unless_current+ a block which will # specialize the default behavior (e.g., show a "Start Here" link rather # than the link's text). # # ==== Examples # Let's say you have a navigation menu... # # # # If in the "about" action, it will render... # # # # ...but if in the "index" action, it will render: # # # # The implicit block given to +link_to_unless_current+ is evaluated if the current # action is the action given. So, if we had a comments page and wanted to render a # "Go Back" link instead of a link to the comments page, we could do something like this... # # <%= # link_to_unless_current("Comment", { controller: "comments", action: "new" }) do # link_to("Go back", { controller: "posts", action: "index" }) # end # %> # # source://actionview//lib/action_view/helpers/url_helper.rb#390 def link_to_unless_current(name, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a mailto link tag to the specified +email_address+, which is # also used as the name of the link unless +name+ is specified. Additional # HTML attributes for the link can be passed in +html_options+. # # +mail_to+ has several methods for customizing the email itself by # passing special keys to +html_options+. # # ==== Options # * :subject - Preset the subject line of the email. # * :body - Preset the body of the email. # * :cc - Carbon Copy additional recipients on the email. # * :bcc - Blind Carbon Copy additional recipients on the email. # * :reply_to - Preset the +Reply-To+ field of the email. # # ==== Obfuscation # Prior to \Rails 4.0, +mail_to+ provided options for encoding the address # in order to hinder email harvesters. To take advantage of these options, # install the +actionview-encoded_mail_to+ gem. # # ==== Examples # mail_to "me@domain.com" # # => me@domain.com # # mail_to "me@domain.com", "My email" # # => My email # # mail_to "me@domain.com", cc: "ccaddress@domain.com", # subject: "This is an example email" # # => me@domain.com # # You can use a block as well if your link target is hard to fit into the name parameter. ERB example: # # <%= mail_to "me@domain.com" do %> # Email me: me@domain.com # <% end %> # # => # Email me: me@domain.com # # # source://actionview//lib/action_view/helpers/url_helper.rb#487 def mail_to(email_address, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates a TEL anchor link tag to the specified +phone_number+. When the # link is clicked, the default app to make phone calls is opened and # prepopulated with the phone number. # # If +name+ is not specified, +phone_number+ will be used as the name of # the link. # # A +country_code+ option is supported, which prepends a plus sign and the # given country code to the linked phone number. For example, # country_code: "01" will prepend +01 to the linked # phone number. # # Additional HTML attributes for the link can be passed via +html_options+. # # ==== Options # * :country_code - Prepends the country code to the phone number # # ==== Examples # phone_to "1234567890" # # => 1234567890 # # phone_to "1234567890", "Phone me" # # => Phone me # # phone_to "1234567890", country_code: "01" # # => 1234567890 # # You can use a block as well if your link target is hard to fit into the name parameter. \ERB example: # # <%= phone_to "1234567890" do %> # Phone me: # <% end %> # # => # Phone me: # # # source://actionview//lib/action_view/helpers/url_helper.rb#669 def phone_to(phone_number, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Creates an SMS anchor link tag to the specified +phone_number+. When the # link is clicked, the default SMS messaging app is opened ready to send a # message to the linked phone number. If the +body+ option is specified, # the contents of the message will be preset to +body+. # # If +name+ is not specified, +phone_number+ will be used as the name of # the link. # # A +country_code+ option is supported, which prepends a plus sign and the # given country code to the linked phone number. For example, # country_code: "01" will prepend +01 to the linked # phone number. # # Additional HTML attributes for the link can be passed via +html_options+. # # ==== Options # * :country_code - Prepend the country code to the phone number. # * :body - Preset the body of the message. # # ==== Examples # sms_to "5155555785" # # => 5155555785 # # sms_to "5155555785", country_code: "01" # # => 5155555785 # # sms_to "5155555785", "Text me" # # => Text me # # sms_to "5155555785", body: "I have a question about your product." # # => 5155555785 # # You can use a block as well if your link target is hard to fit into the name parameter. \ERB example: # # <%= sms_to "5155555785" do %> # Text me: # <% end %> # # => # Text me: # # # source://actionview//lib/action_view/helpers/url_helper.rb#618 def sms_to(phone_number, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end # Basic implementation of url_for to allow use helpers without routes existence # # source://actionview//lib/action_view/helpers/url_helper.rb#38 def url_for(options = T.unsafe(nil)); end private # source://actionview//lib/action_view/helpers/url_helper.rb#50 def _back_url; end # source://actionview//lib/action_view/helpers/url_helper.rb#55 def _filtered_referrer; end # source://actionview//lib/action_view/helpers/url_helper.rb#712 def add_method_to_attributes!(html_options, method); end # source://actionview//lib/action_view/helpers/url_helper.rb#683 def convert_options_to_data_attributes(options, html_options); end # @return [Boolean] # # source://actionview//lib/action_view/helpers/url_helper.rb#706 def link_to_remote_options?(options); end # source://actionview//lib/action_view/helpers/url_helper.rb#723 def method_for_options(options); end # @return [Boolean] # # source://actionview//lib/action_view/helpers/url_helper.rb#741 def method_not_get_method?(method); end # source://actionview//lib/action_view/helpers/url_helper.rb#760 def method_tag(method); end # source://actionview//lib/action_view/helpers/url_helper.rb#806 def remove_trailing_slash!(url_string); end # Returns an array of hashes each containing :name and :value keys # suitable for use as the names and values of form input fields: # # to_form_params(name: 'David', nationality: 'Danish') # # => [{name: 'name', value: 'David'}, {name: 'nationality', value: 'Danish'}] # # to_form_params(country: { name: 'Denmark' }) # # => [{name: 'country[name]', value: 'Denmark'}] # # to_form_params(countries: ['Denmark', 'Sweden']}) # # => [{name: 'countries[]', value: 'Denmark'}, {name: 'countries[]', value: 'Sweden'}] # # An optional namespace can be passed to enclose key names: # # to_form_params({ name: 'Denmark' }, 'country') # # => [{name: 'country[name]', value: 'Denmark'}] # # source://actionview//lib/action_view/helpers/url_helper.rb#780 def to_form_params(attribute, namespace = T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/url_helper.rb#746 def token_tag(token = T.unsafe(nil), form_options: T.unsafe(nil)); end # source://actionview//lib/action_view/helpers/url_helper.rb#698 def url_target(name, options); end class << self # source://actionview//lib/action_view/helpers/url_helper.rb#35 def button_to_generates_button_tag; end # source://actionview//lib/action_view/helpers/url_helper.rb#35 def button_to_generates_button_tag=(val); end end end # This helper may be included in any class that includes the # URL helpers of a routes (routes.url_helpers). Some methods # provided here will only work in the context of a request # (link_to_unless_current, for instance), which must be provided # as a method called #request on the context. # # source://actionview//lib/action_view/helpers/url_helper.rb#23 ActionView::Helpers::UrlHelper::BUTTON_TAG_METHOD_VERBS = T.let(T.unsafe(nil), Array) # source://actionview//lib/action_view/helpers/url_helper.rb#29 module ActionView::Helpers::UrlHelper::ClassMethods # source://actionview//lib/action_view/helpers/url_helper.rb#30 def _url_for_modules; end end # source://actionview//lib/action_view/helpers/url_helper.rb#733 ActionView::Helpers::UrlHelper::STRINGIFIED_COMMON_METHODS = T.let(T.unsafe(nil), Hash) # This is a class to fix I18n global state. Whenever you provide I18n.locale during a request, # it will trigger the lookup_context and consequently expire the cache. # # source://actionview//lib/action_view/rendering.rb#8 class ActionView::I18nProxy < ::I18n::Config # @return [I18nProxy] a new instance of I18nProxy # # source://actionview//lib/action_view/rendering.rb#11 def initialize(original_config, lookup_context); end # source://actionview//lib/action_view/rendering.rb#17 def locale; end # source://actionview//lib/action_view/rendering.rb#21 def locale=(value); end # source://actionview//lib/action_view/rendering.rb#9 def lookup_context; end # source://actionview//lib/action_view/rendering.rb#9 def original_config; end end # = Action View \Layouts # # Layouts reverse the common pattern of including shared headers and footers in many templates to isolate changes in # repeated setups. The inclusion pattern has pages that look like this: # # <%= render "application/header" %> # Hello World # <%= render "application/footer" %> # # This approach is a decent way of keeping common structures isolated from the changing content, but it's verbose # and if you ever want to change the structure of these two includes, you'll have to change all the templates. # # With layouts, you can flip it around and have the common structure know where to insert changing content. This means # that the header and footer are only mentioned in one place, like this: # # // The header part of this layout # <%= yield %> # // The footer part of this layout # # And then you have content pages that look like this: # # hello world # # At rendering time, the content page is computed and then inserted in the layout, like this: # # // The header part of this layout # hello world # // The footer part of this layout # # == Accessing shared variables # # Layouts have access to variables specified in the content pages and vice versa. This allows you to have layouts with # references that won't materialize before rendering time: # #

    <%= @page_title %>

    # <%= yield %> # # ...and content pages that fulfill these references _at_ rendering time: # # <% @page_title = "Welcome" %> # Off-world colonies offers you a chance to start a new life # # The result after rendering is: # #

    Welcome

    # Off-world colonies offers you a chance to start a new life # # == Layout assignment # # You can either specify a layout declaratively (using the #layout class method) or give # it the same name as your controller, and place it in app/views/layouts. # If a subclass does not have a layout specified, it inherits its layout using normal Ruby inheritance. # # For instance, if you have PostsController and a template named app/views/layouts/posts.html.erb, # that template will be used for all actions in PostsController and controllers inheriting # from PostsController. # # If you use a module, for instance Weblog::PostsController, you will need a template named # app/views/layouts/weblog/posts.html.erb. # # Since all your controllers inherit from ApplicationController, they will use # app/views/layouts/application.html.erb if no other layout is specified # or provided. # # == Inheritance Examples # # class BankController < ActionController::Base # # bank.html.erb exists # # class ExchangeController < BankController # # exchange.html.erb exists # # class CurrencyController < BankController # # class InformationController < BankController # layout "information" # # class TellerController < InformationController # # teller.html.erb exists # # class EmployeeController < InformationController # # employee.html.erb exists # layout nil # # class VaultController < BankController # layout :access_level_layout # # class TillController < BankController # layout false # # In these examples, we have three implicit lookup scenarios: # * The +BankController+ uses the "bank" layout. # * The +ExchangeController+ uses the "exchange" layout. # * The +CurrencyController+ inherits the layout from BankController. # # However, when a layout is explicitly set, the explicitly set layout wins: # * The +InformationController+ uses the "information" layout, explicitly set. # * The +TellerController+ also uses the "information" layout, because the parent explicitly set it. # * The +EmployeeController+ uses the "employee" layout, because it set the layout to +nil+, resetting the parent configuration. # * The +VaultController+ chooses a layout dynamically by calling the access_level_layout method. # * The +TillController+ does not use a layout at all. # # == Types of layouts # # Layouts are basically just regular templates, but the name of this template needs not be specified statically. Sometimes # you want to alternate layouts depending on runtime information, such as whether someone is logged in or not. This can # be done either by specifying a method reference as a symbol or using an inline method (as a proc). # # The method reference is the preferred approach to variable layouts and is used like this: # # class WeblogController < ActionController::Base # layout :writers_and_readers # # def index # # fetching posts # end # # private # def writers_and_readers # logged_in? ? "writer_layout" : "reader_layout" # end # end # # Now when a new request for the index action is processed, the layout will vary depending on whether the person accessing # is logged in or not. # # If you want to use an inline method, such as a proc, do something like this: # # class WeblogController < ActionController::Base # layout proc { |controller| controller.logged_in? ? "writer_layout" : "reader_layout" } # end # # If an argument isn't given to the proc, it's evaluated in the context of # the current controller anyway. # # class WeblogController < ActionController::Base # layout proc { logged_in? ? "writer_layout" : "reader_layout" } # end # # Of course, the most common way of specifying a layout is still just as a plain template name: # # class WeblogController < ActionController::Base # layout "weblog_standard" # end # # The template will be looked always in app/views/layouts/ folder. But you can point # layouts folder direct also. layout "layouts/demo" is the same as layout "demo". # # Setting the layout to +nil+ forces it to be looked up in the filesystem and falls back to the parent behavior if none exists. # Setting it to +nil+ is useful to re-enable template lookup overriding a previous configuration set in the parent: # # class ApplicationController < ActionController::Base # layout "application" # end # # class PostsController < ApplicationController # # Will use "application" layout # end # # class CommentsController < ApplicationController # # Will search for "comments" layout and fall back to "application" layout # layout nil # end # # == Conditional layouts # # If you have a layout that by default is applied to all the actions of a controller, you still have the option of rendering # a given action or set of actions without a layout, or restricting a layout to only a single action or a set of actions. The # :only and :except options can be passed to the layout call. For example: # # class WeblogController < ActionController::Base # layout "weblog_standard", except: :rss # # # ... # # end # # This will assign "weblog_standard" as the WeblogController's layout for all actions except for the +rss+ action, which will # be rendered directly, without wrapping a layout around the rendered view. # # Both the :only and :except condition can accept an arbitrary number of method references, so # except: [ :rss, :text_only ] is valid, as is except: :rss. # # == Using a different layout in the action render call # # If most of your actions use the same layout, it makes perfect sense to define a controller-wide layout as described above. # Sometimes you'll have exceptions where one action wants to use a different layout than the rest of the controller. # You can do this by passing a :layout option to the render call. For example: # # class WeblogController < ActionController::Base # layout "weblog_standard" # # def help # render action: "help", layout: "help" # end # end # # This will override the controller-wide "weblog_standard" layout, and will render the help action with the "help" layout instead. # # source://actionview//lib/action_view/layouts.rb#205 module ActionView::Layouts extend ::ActiveSupport::Concern include GeneratedInstanceMethods include ::ActionView::ViewPaths include ::ActionView::Rendering mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods mixes_in_class_methods ::ActionView::Rendering::ClassMethods mixes_in_class_methods ::ActionView::Layouts::ClassMethods # source://actionview//lib/action_view/layouts.rb#361 def initialize(*_arg0); end # source://actionview//lib/action_view/layouts.rb#350 def _process_render_template_options(options); end def action_has_layout=(_arg0); end # Controls whether an action should be rendered using a layout. # If you want to disable any layout settings for the # current action so that it is rendered without a layout then # either override this method in your controller to return false # for that action or set the action_has_layout attribute # to false before rendering. # # @return [Boolean] # # source://actionview//lib/action_view/layouts.rb#372 def action_has_layout?; end private # @return [Boolean] # # source://actionview//lib/action_view/layouts.rb#377 def _conditional_layout?; end # Returns the default layout for this controller. # Optionally raises an exception if the layout could not be found. # # ==== Parameters # * formats - The formats accepted to this layout # * require_layout - If set to +true+ and layout is not found, # an +ArgumentError+ exception is raised (defaults to +false+) # # ==== Returns # * template - The template object for the default layout (or +nil+) # # source://actionview//lib/action_view/layouts.rb#415 def _default_layout(lookup_context, formats, require_layout = T.unsafe(nil)); end # @return [Boolean] # # source://actionview//lib/action_view/layouts.rb#430 def _include_layout?(options); end # This will be overwritten by _write_layout_method # # source://actionview//lib/action_view/layouts.rb#382 def _layout(*_arg0); end # Determine the layout for a given name, taking into account the name type. # # ==== Parameters # * name - The name of the template # # source://actionview//lib/action_view/layouts.rb#388 def _layout_for_option(name); end # source://actionview//lib/action_view/layouts.rb#401 def _normalize_layout(value); end module GeneratedClassMethods def _layout; end def _layout=(value); end def _layout?; end def _layout_conditions; end def _layout_conditions=(value); end def _layout_conditions?; end end module GeneratedInstanceMethods def _layout_conditions; end def _layout_conditions?; end end end # source://actionview//lib/action_view/layouts.rb#217 module ActionView::Layouts::ClassMethods # Creates a _layout method to be called by _default_layout . # # If a layout is not explicitly mentioned then look for a layout with the controller's name. # if nothing is found then try same procedure to find super class's layout. # # source://actionview//lib/action_view/layouts.rb#283 def _write_layout_method; end # source://actionview//lib/action_view/layouts.rb#218 def inherited(klass); end # Specify the layout to use for this class. # # If the specified layout is a: # String:: the String is the template name # Symbol:: call the method specified by the symbol # Proc:: call the passed Proc # false:: There is no layout # true:: raise an ArgumentError # nil:: Force default layout behavior with inheritance # # Return value of +Proc+ and +Symbol+ arguments should be +String+, +false+, +true+, or +nil+ # with the same meaning as described above. # # ==== Parameters # # * layout - The layout to use. # # ==== Options (conditions) # # * +:only+ - A list of actions to apply this layout to. # * +:except+ - Apply this layout to all actions but this one. # # source://actionview//lib/action_view/layouts.rb#269 def layout(layout, conditions = T.unsafe(nil)); end private # If no layout is supplied, look for a template named the return # value of this method. # # ==== Returns # * String - A template name # # source://actionview//lib/action_view/layouts.rb#345 def _implied_layout_name; end end # This module is mixed in if layout conditions are provided. This means # that if no layout conditions are used, this method is not used # # source://actionview//lib/action_view/layouts.rb#225 module ActionView::Layouts::ClassMethods::LayoutConditions private # Determines whether the current action has a layout definition by # checking the action name against the :only and :except conditions # set by the layout method. # # ==== Returns # * Boolean - True if the action has a layout definition, false otherwise. # # @return [Boolean] # # source://actionview//lib/action_view/layouts.rb#233 def _conditional_layout?; end end # = Action View Log Subscriber # # Provides functionality so that \Rails can output logs from Action View. # # source://actionview//lib/action_view/log_subscriber.rb#9 class ActionView::LogSubscriber < ::ActiveSupport::LogSubscriber include ::ActionView::LogSubscriber::Utils # @return [LogSubscriber] a new instance of LogSubscriber # # source://actionview//lib/action_view/log_subscriber.rb#12 def initialize; end # source://actionview//lib/action_view/log_subscriber.rb#45 def render_collection(event); end # source://actionview//lib/action_view/log_subscriber.rb#37 def render_layout(event); end # source://actionview//lib/action_view/log_subscriber.rb#26 def render_partial(event); end # source://actionview//lib/action_view/log_subscriber.rb#17 def render_template(event); end private # source://actionview//lib/action_view/log_subscriber.rb#121 def cache_message(payload); end # source://actionview//lib/action_view/log_subscriber.rb#113 def render_count(payload); end class << self # source://actionview//lib/action_view/log_subscriber.rb#105 def attach_to(*_arg0); end private # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15 def __class_attr_log_levels; end # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17 def __class_attr_log_levels=(new_value); end end end # source://actionview//lib/action_view/log_subscriber.rb#76 class ActionView::LogSubscriber::Start include ::ActionView::LogSubscriber::Utils # source://actionview//lib/action_view/log_subscriber.rb#97 def finish(name, id, payload); end # @return [Boolean] # # source://actionview//lib/action_view/log_subscriber.rb#100 def silenced?(_); end # source://actionview//lib/action_view/log_subscriber.rb#79 def start(name, id, payload); end end # source://actionview//lib/action_view/log_subscriber.rb#57 module ActionView::LogSubscriber::Utils # source://actionview//lib/action_view/log_subscriber.rb#58 def logger; end private # source://actionview//lib/action_view/log_subscriber.rb#63 def from_rails_root(string); end # source://actionview//lib/action_view/log_subscriber.rb#69 def rails_root; end end # source://actionview//lib/action_view/log_subscriber.rb#10 ActionView::LogSubscriber::VIEWS_PATTERN = T.let(T.unsafe(nil), Regexp) # = Action View Lookup Context # # LookupContext is the object responsible for holding all information # required for looking up templates, i.e. view paths and details. # LookupContext is also responsible for generating a key, given to # view paths, used in the resolver cache lookup. Since this key is generated # only once during the request, it speeds up all cache accesses. # # source://actionview//lib/action_view/lookup_context.rb#15 class ActionView::LookupContext include ::ActionView::LookupContext::Accessors include ::ActionView::LookupContext::DetailsCache include ::ActionView::LookupContext::ViewPaths # @return [LookupContext] a new instance of LookupContext # # source://actionview//lib/action_view/lookup_context.rb#232 def initialize(view_paths, details = T.unsafe(nil), prefixes = T.unsafe(nil)); end # source://actionview//lib/action_view/lookup_context.rb#242 def digest_cache; end # Override formats= to expand ["*/*"] values and automatically # add :html as fallback to :js. # # source://actionview//lib/action_view/lookup_context.rb#263 def formats=(values); end # Override locale to return a symbol instead of array. # # source://actionview//lib/action_view/lookup_context.rb#283 def locale; end # Overload locale= to also set the I18n.locale. If the current I18n.config object responds # to original_config, it means that it has a copy of the original I18n configuration and it's # acting as proxy, which we need to skip. # # source://actionview//lib/action_view/lookup_context.rb#290 def locale=(value); end # source://actionview//lib/action_view/lookup_context.rb#16 def prefixes; end # source://actionview//lib/action_view/lookup_context.rb#16 def prefixes=(_arg0); end # source://actionview//lib/action_view/lookup_context.rb#246 def with_prepended_formats(formats); end private # source://actionview//lib/action_view/lookup_context.rb#253 def initialize_details(target, details); end class << self # source://actionview//lib/action_view/lookup_context.rb#21 def register_detail(name, &block); end # source://actionview//lib/action_view/lookup_context.rb#18 def registered_details; end # source://actionview//lib/action_view/lookup_context.rb#18 def registered_details=(_arg0); end end end # Holds accessors for the registered details. # # source://actionview//lib/action_view/lookup_context.rb#39 module ActionView::LookupContext::Accessors # source://actionview//lib/action_view/lookup_context.rb#50 def default_formats; end # source://actionview//lib/action_view/lookup_context.rb#52 def default_handlers; end # source://actionview//lib/action_view/lookup_context.rb#43 def default_locale; end # source://actionview//lib/action_view/lookup_context.rb#51 def default_variants; end # source://actionview//lib/action_view/lookup_context.rb#27 def formats; end # source://actionview//lib/action_view/lookup_context.rb#31 def formats=(value); end # source://actionview//lib/action_view/lookup_context.rb#27 def handlers; end # source://actionview//lib/action_view/lookup_context.rb#31 def handlers=(value); end # source://actionview//lib/action_view/lookup_context.rb#27 def locale; end # source://actionview//lib/action_view/lookup_context.rb#31 def locale=(value); end # source://actionview//lib/action_view/lookup_context.rb#27 def variants; end # source://actionview//lib/action_view/lookup_context.rb#31 def variants=(value); end end # source://actionview//lib/action_view/lookup_context.rb#40 ActionView::LookupContext::Accessors::DEFAULT_PROCS = T.let(T.unsafe(nil), Hash) # Add caching behavior on top of Details. # # source://actionview//lib/action_view/lookup_context.rb#98 module ActionView::LookupContext::DetailsCache # Returns the value of attribute cache. # # source://actionview//lib/action_view/lookup_context.rb#99 def cache; end # Sets the attribute cache # # @param value the value to set the attribute cache to. # # source://actionview//lib/action_view/lookup_context.rb#99 def cache=(_arg0); end # Calculate the details key. Remove the handlers from calculation to improve performance # since the user cannot modify it explicitly. # # source://actionview//lib/action_view/lookup_context.rb#103 def details_key; end # Temporary skip passing the details_key forward. # # source://actionview//lib/action_view/lookup_context.rb#108 def disable_cache; end private # source://actionview//lib/action_view/lookup_context.rb#116 def _set_detail(key, value); end end # source://actionview//lib/action_view/lookup_context.rb#54 class ActionView::LookupContext::DetailsKey def eql?(_arg0); end class << self # source://actionview//lib/action_view/lookup_context.rb#77 def clear; end # source://actionview//lib/action_view/lookup_context.rb#65 def details_cache_key(details); end # source://actionview//lib/action_view/lookup_context.rb#61 def digest_cache(details); end # source://actionview//lib/action_view/lookup_context.rb#86 def digest_caches; end # source://actionview//lib/action_view/lookup_context.rb#90 def view_context_class; end end end # Helpers related to template lookup using the lookup context information. # # source://actionview//lib/action_view/lookup_context.rb#125 module ActionView::LookupContext::ViewPaths # @return [Boolean] # # source://actionview//lib/action_view/lookup_context.rb#148 def any?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end # @return [Boolean] # # source://actionview//lib/action_view/lookup_context.rb#148 def any_templates?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end # source://actionview//lib/action_view/lookup_context.rb#155 def append_view_paths(paths); end # @return [Boolean] # # source://actionview//lib/action_view/lookup_context.rb#141 def exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end # source://actionview//lib/action_view/lookup_context.rb#128 def find(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end # source://actionview//lib/action_view/lookup_context.rb#135 def find_all(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end # source://actionview//lib/action_view/lookup_context.rb#128 def find_template(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end # Returns the value of attribute html_fallback_for_js. # # source://actionview//lib/action_view/lookup_context.rb#126 def html_fallback_for_js; end # source://actionview//lib/action_view/lookup_context.rb#159 def prepend_view_paths(paths); end # @return [Boolean] # # source://actionview//lib/action_view/lookup_context.rb#141 def template_exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end # Returns the value of attribute view_paths. # # source://actionview//lib/action_view/lookup_context.rb#126 def view_paths; end private # Whenever setting view paths, makes a copy so that we can manipulate them in # instance objects as we wish. # # source://actionview//lib/action_view/lookup_context.rb#166 def build_view_paths(paths); end # Compute details hash and key according to user options (e.g. passed from #render). # # source://actionview//lib/action_view/lookup_context.rb#175 def detail_args_for(options); end # source://actionview//lib/action_view/lookup_context.rb#188 def detail_args_for_any; end # Fix when prefix is specified as part of the template name # # source://actionview//lib/action_view/lookup_context.rb#209 def normalize_name(name, prefixes); end end # source://actionview//lib/action_view/template/error.rb#30 class ActionView::MissingTemplate < ::ActionView::ActionViewError include ::DidYouMean::Correctable # @return [MissingTemplate] a new instance of MissingTemplate # # source://actionview//lib/action_view/template/error.rb#33 def initialize(paths, path, prefixes, partial, details, *_arg5); end # Apps may have thousands of candidate templates so we attempt to # generate the suggestions as efficiently as possible. # First we split templates into prefixes and basenames, so that those can # be matched separately. # # source://actionview//lib/action_view/template/error.rb#93 def corrections; end # Returns the value of attribute partial. # # source://actionview//lib/action_view/template/error.rb#31 def partial; end # Returns the value of attribute path. # # source://actionview//lib/action_view/template/error.rb#31 def path; end # Returns the value of attribute paths. # # source://actionview//lib/action_view/template/error.rb#31 def paths; end # Returns the value of attribute prefixes. # # source://actionview//lib/action_view/template/error.rb#31 def prefixes; end end # source://actionview//lib/action_view/template/error.rb#60 class ActionView::MissingTemplate::Results # @return [Results] a new instance of Results # # source://actionview//lib/action_view/template/error.rb#63 def initialize(size); end # source://actionview//lib/action_view/template/error.rb#80 def add(path, score); end # @return [Boolean] # # source://actionview//lib/action_view/template/error.rb#72 def should_record?(score); end # source://actionview//lib/action_view/template/error.rb#68 def to_a; end end # source://actionview//lib/action_view/template/error.rb#61 class ActionView::MissingTemplate::Results::Result < ::Struct # Returns the value of attribute path # # @return [Object] the current value of path def path; end # Sets the attribute path # # @param value [Object] the value to set the attribute path to. # @return [Object] the newly set value def path=(_); end # Returns the value of attribute score # # @return [Object] the current value of score def score; end # Sets the attribute score # # @param value [Object] the value to set the attribute score to. # @return [Object] the newly set value def score=(_); end class << self def [](*_arg0); end def inspect; end def keyword_init?; end def members; end def new(*_arg0); end end end # source://actionview//lib/action_view/model_naming.rb#4 module ActionView::ModelNaming # Converts the given object to an Active Model compliant one. # # source://actionview//lib/action_view/model_naming.rb#6 def convert_to_model(object); end # source://actionview//lib/action_view/model_naming.rb#10 def model_name_from_record_or_class(record_or_class); end end # source://actionview//lib/action_view/renderer/object_renderer.rb#4 class ActionView::ObjectRenderer < ::ActionView::PartialRenderer include ::ActionView::AbstractRenderer::ObjectRendering # @return [ObjectRenderer] a new instance of ObjectRenderer # # source://actionview//lib/action_view/renderer/object_renderer.rb#7 def initialize(lookup_context, options); end # source://actionview//lib/action_view/renderer/object_renderer.rb#19 def render_object_derive_partial(object, context, block); end # source://actionview//lib/action_view/renderer/object_renderer.rb#13 def render_object_with_partial(object, partial, context, block); end private # source://actionview//lib/action_view/renderer/object_renderer.rb#29 def render_partial_template(view, locals, template, layout, block); end # source://actionview//lib/action_view/renderer/object_renderer.rb#25 def template_keys(path); end end # Used as a buffer for views # # The main difference between this and ActiveSupport::SafeBuffer # is for the methods `<<` and `safe_expr_append=` the inputs are # checked for nil before they are assigned and `to_s` is called on # the input. For example: # # obuf = ActionView::OutputBuffer.new "hello" # obuf << 5 # puts obuf # => "hello5" # # sbuf = ActiveSupport::SafeBuffer.new "hello" # sbuf << 5 # puts sbuf # => "hello\u0005" # # source://actionview//lib/action_view/buffers.rb#21 class ActionView::OutputBuffer # @return [OutputBuffer] a new instance of OutputBuffer # # source://actionview//lib/action_view/buffers.rb#22 def initialize(buffer = T.unsafe(nil)); end # source://actionview//lib/action_view/buffers.rb#42 def <<(value); end # source://actionview//lib/action_view/buffers.rb#81 def ==(other); end # source://actionview//lib/action_view/buffers.rb#42 def append=(value); end # source://actionview//lib/action_view/buffers.rb#27 def blank?(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/buffers.rb#72 def capture(*args); end # source://actionview//lib/action_view/buffers.rb#42 def concat(value); end # source://actionview//lib/action_view/buffers.rb#27 def empty?(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/buffers.rb#27 def encode!(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/buffers.rb#27 def encoding(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/buffers.rb#27 def force_encoding(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/buffers.rb#29 def html_safe; end # @return [Boolean] # # source://actionview//lib/action_view/buffers.rb#38 def html_safe?; end # source://actionview//lib/action_view/buffers.rb#27 def length(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/buffers.rb#85 def raw; end # Returns the value of attribute raw_buffer. # # source://actionview//lib/action_view/buffers.rb#89 def raw_buffer; end # source://actionview//lib/action_view/buffers.rb#56 def safe_append=(value); end # source://actionview//lib/action_view/buffers.rb#56 def safe_concat(value); end # source://actionview//lib/action_view/buffers.rb#62 def safe_expr_append=(val); end # source://actionview//lib/action_view/buffers.rb#29 def to_s; end # source://actionview//lib/action_view/buffers.rb#34 def to_str; end private # source://actionview//lib/action_view/buffers.rb#68 def initialize_copy(other); end end # source://actionview//lib/action_view/flows.rb#6 class ActionView::OutputFlow # @return [OutputFlow] a new instance of OutputFlow # # source://actionview//lib/action_view/flows.rb#9 def initialize; end # Called by content_for # # source://actionview//lib/action_view/flows.rb#24 def append(key, value); end # Called by content_for # # source://actionview//lib/action_view/flows.rb#24 def append!(key, value); end # Returns the value of attribute content. # # source://actionview//lib/action_view/flows.rb#7 def content; end # Called by _layout_for to read stored values. # # source://actionview//lib/action_view/flows.rb#14 def get(key); end # Called by each renderer object to set the layout contents. # # source://actionview//lib/action_view/flows.rb#19 def set(key, value); end end # source://actionview//lib/action_view/renderer/collection_renderer.rb#6 class ActionView::PartialIteration # @return [PartialIteration] a new instance of PartialIteration # # source://actionview//lib/action_view/renderer/collection_renderer.rb#13 def initialize(size); end # Check if this is the first iteration of the partial. # # @return [Boolean] # # source://actionview//lib/action_view/renderer/collection_renderer.rb#19 def first?; end # The current iteration of the partial. # # source://actionview//lib/action_view/renderer/collection_renderer.rb#11 def index; end # source://actionview//lib/action_view/renderer/collection_renderer.rb#28 def iterate!; end # Check if this is the last iteration of the partial. # # @return [Boolean] # # source://actionview//lib/action_view/renderer/collection_renderer.rb#24 def last?; end # The number of iterations that will be done by the partial. # # source://actionview//lib/action_view/renderer/collection_renderer.rb#8 def size; end end # = Action View Partials # # There's also a convenience method for rendering sub templates within the current controller that depends on a # single object (we call this kind of sub templates for partials). It relies on the fact that partials should # follow the naming convention of being prefixed with an underscore -- as to separate them from regular # templates that could be rendered on their own. # # In a template for Advertiser#account: # # <%= render partial: "account" %> # # This would render "advertiser/_account.html.erb". # # In another template for Advertiser#buy, we could have: # # <%= render partial: "account", locals: { account: @buyer } %> # # <% @advertisements.each do |ad| %> # <%= render partial: "ad", locals: { ad: ad } %> # <% end %> # # This would first render advertiser/_account.html.erb with @buyer passed in as the local variable +account+, then # render advertiser/_ad.html.erb and pass the local variable +ad+ to the template for display. # # == The +:as+ and +:object+ options # # By default ActionView::PartialRenderer doesn't have any local variables. # The :object option can be used to pass an object to the partial. For instance: # # <%= render partial: "account", object: @buyer %> # # would provide the @buyer object to the partial, available under the local variable +account+ and is # equivalent to: # # <%= render partial: "account", locals: { account: @buyer } %> # # With the :as option we can specify a different name for said local variable. For example, if we # wanted it to be +user+ instead of +account+ we'd do: # # <%= render partial: "account", object: @buyer, as: 'user' %> # # This is equivalent to # # <%= render partial: "account", locals: { user: @buyer } %> # # == \Rendering a collection of partials # # The example of partial use describes a familiar pattern where a template needs to iterate over an array and # render a sub template for each of the elements. This pattern has been implemented as a single method that # accepts an array and renders a partial by the same name as the elements contained within. So the three-lined # example in "Using partials" can be rewritten with a single line: # # <%= render partial: "ad", collection: @advertisements %> # # This will render advertiser/_ad.html.erb and pass the local variable +ad+ to the template for display. An # iteration object will automatically be made available to the template with a name of the form # +partial_name_iteration+. The iteration object has knowledge about which index the current object has in # the collection and the total size of the collection. The iteration object also has two convenience methods, # +first?+ and +last?+. In the case of the example above, the template would be fed +ad_iteration+. # For backwards compatibility the +partial_name_counter+ is still present and is mapped to the iteration's # +index+ method. # # The :as option may be used when rendering partials. # # You can specify a partial to be rendered between elements via the :spacer_template option. # The following example will render advertiser/_ad_divider.html.erb between each ad partial: # # <%= render partial: "ad", collection: @advertisements, spacer_template: "ad_divider" %> # # If the given :collection is +nil+ or empty, render will return +nil+. This will allow you # to specify a text which will be displayed instead by using this form: # # <%= render(partial: "ad", collection: @advertisements) || "There's no ad to be displayed" %> # # == \Rendering shared partials # # Two controllers can share a set of partials and render them like this: # # <%= render partial: "advertisement/ad", locals: { ad: @advertisement } %> # # This will render the partial advertisement/_ad.html.erb regardless of which controller this is being called from. # # == \Rendering objects that respond to +to_partial_path+ # # Instead of explicitly naming the location of a partial, you can also let PartialRenderer do the work # and pick the proper path by checking +to_partial_path+ method. # # # @account.to_partial_path returns 'accounts/account', so it can be used to replace: # # <%= render partial: "accounts/account", locals: { account: @account} %> # <%= render partial: @account %> # # # @posts is an array of Post instances, so every post record returns 'posts/post' on +to_partial_path+, # # that's why we can replace: # # <%= render partial: "posts/post", collection: @posts %> # <%= render partial: @posts %> # # == \Rendering the default case # # If you're not going to be using any of the options like collections or layouts, you can also use the short-hand # defaults of render to render partials. Examples: # # # Instead of <%= render partial: "account" %> # <%= render "account" %> # # # Instead of <%= render partial: "account", locals: { account: @buyer } %> # <%= render "account", account: @buyer %> # # # @account.to_partial_path returns 'accounts/account', so it can be used to replace: # # <%= render partial: "accounts/account", locals: { account: @account} %> # <%= render @account %> # # # @posts is an array of Post instances, so every post record returns 'posts/post' on +to_partial_path+, # # that's why we can replace: # # <%= render partial: "posts/post", collection: @posts %> # <%= render @posts %> # # == \Rendering partials with layouts # # Partials can have their own layouts applied to them. These layouts are different than the ones that are # specified globally for the entire action, but they work in a similar fashion. Imagine a list with two types # of users: # # <%# app/views/users/index.html.erb %> # Here's the administrator: # <%= render partial: "user", layout: "administrator", locals: { user: administrator } %> # # Here's the editor: # <%= render partial: "user", layout: "editor", locals: { user: editor } %> # # <%# app/views/users/_user.html.erb %> # Name: <%= user.name %> # # <%# app/views/users/_administrator.html.erb %> #
    # Budget: $<%= user.budget %> # <%= yield %> #
    # # <%# app/views/users/_editor.html.erb %> #
    # Deadline: <%= user.deadline %> # <%= yield %> #
    # # ...this will return: # # Here's the administrator: #
    # Budget: $<%= user.budget %> # Name: <%= user.name %> #
    # # Here's the editor: #
    # Deadline: <%= user.deadline %> # Name: <%= user.name %> #
    # # If a collection is given, the layout will be rendered once for each item in # the collection. For example, these two snippets have the same output: # # <%# app/views/users/_user.html.erb %> # Name: <%= user.name %> # # <%# app/views/users/index.html.erb %> # <%# This does not use layouts %> #
      # <% users.each do |user| -%> #
    • # <%= render partial: "user", locals: { user: user } %> #
    • # <% end -%> #
    # # <%# app/views/users/_li_layout.html.erb %> #
  • # <%= yield %> #
  • # # <%# app/views/users/index.html.erb %> #
      # <%= render partial: "user", layout: "li_layout", collection: users %> #
    # # Given two users whose names are Alice and Bob, these snippets return: # #
      #
    • # Name: Alice #
    • #
    • # Name: Bob #
    • #
    # # The current object being rendered, as well as the object_counter, will be # available as local variables inside the layout template under the same names # as available in the partial. # # You can also apply a layout to a block within any template: # # <%# app/views/users/_chief.html.erb %> # <%= render(layout: "administrator", locals: { user: chief }) do %> # Title: <%= chief.title %> # <% end %> # # ...this will return: # #
    # Budget: $<%= user.budget %> # Title: <%= chief.name %> #
    # # As you can see, the :locals hash is shared between both the partial and its layout. # # source://actionview//lib/action_view/renderer/partial_renderer.rb#220 class ActionView::PartialRenderer < ::ActionView::AbstractRenderer include ::ActionView::CollectionCaching # @return [PartialRenderer] a new instance of PartialRenderer # # source://actionview//lib/action_view/renderer/partial_renderer.rb#223 def initialize(lookup_context, options); end # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 def collection_cache; end # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 def collection_cache=(val); end # source://actionview//lib/action_view/renderer/partial_renderer.rb#230 def render(partial, context, block); end private # source://actionview//lib/action_view/renderer/partial_renderer.rb#262 def find_template(path, locals); end # source://actionview//lib/action_view/renderer/partial_renderer.rb#245 def render_partial_template(view, locals, template, layout, block); end # source://actionview//lib/action_view/renderer/partial_renderer.rb#241 def template_keys(_); end class << self # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 def collection_cache; end # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#12 def collection_cache=(val); end end end # source://actionview//lib/action_view/path_registry.rb#4 module ActionView::PathRegistry class << self # source://actionview//lib/action_view/path_registry.rb#53 def all_file_system_resolvers; end # source://actionview//lib/action_view/path_registry.rb#47 def all_resolvers; end # source://actionview//lib/action_view/path_registry.rb#22 def cast_file_system_resolvers(paths); end # Returns the value of attribute file_system_resolver_hooks. # # source://actionview//lib/action_view/path_registry.rb#11 def file_system_resolver_hooks; end # source://actionview//lib/action_view/path_registry.rb#14 def get_view_paths(klass); end # source://actionview//lib/action_view/path_registry.rb#18 def set_view_paths(klass, paths); end end end # = Action View PathSet # # This class is used to store and access paths in Action View. A number of # operations are defined so that you can search among the paths in this # set and also perform operations on other +PathSet+ objects. # # A +LookupContext+ will use a +PathSet+ to store the paths in its context. # # source://actionview//lib/action_view/path_set.rb#11 class ActionView::PathSet include ::Enumerable # @return [PathSet] a new instance of PathSet # # source://actionview//lib/action_view/path_set.rb#18 def initialize(paths = T.unsafe(nil)); end # source://actionview//lib/action_view/path_set.rb#35 def +(other); end # source://actionview//lib/action_view/path_set.rb#16 def [](*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/path_set.rb#31 def compact; end # source://actionview//lib/action_view/path_set.rb#16 def each(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # # source://actionview//lib/action_view/path_set.rb#53 def exists?(path, prefixes, partial, details, details_key, locals); end # source://actionview//lib/action_view/path_set.rb#40 def find(path, prefixes, partial, details, details_key, locals); end # source://actionview//lib/action_view/path_set.rb#45 def find_all(path, prefixes, partial, details, details_key, locals); end # source://actionview//lib/action_view/path_set.rb#16 def include?(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute paths. # # source://actionview//lib/action_view/path_set.rb#14 def paths; end # source://actionview//lib/action_view/path_set.rb#16 def size(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/path_set.rb#27 def to_ary; end private # source://actionview//lib/action_view/path_set.rb#22 def initialize_copy(other); end # source://actionview//lib/action_view/path_set.rb#58 def search_combinations(prefixes); end # source://actionview//lib/action_view/path_set.rb#67 def typecast(paths); end end # source://actionview//lib/action_view/buffers.rb#92 class ActionView::RawOutputBuffer # @return [RawOutputBuffer] a new instance of RawOutputBuffer # # source://actionview//lib/action_view/buffers.rb#93 def initialize(buffer); end # source://actionview//lib/action_view/buffers.rb#97 def <<(value); end # source://actionview//lib/action_view/buffers.rb#103 def raw; end end # source://actionview//lib/action_view/buffers.rb#150 class ActionView::RawStreamingBuffer # @return [RawStreamingBuffer] a new instance of RawStreamingBuffer # # source://actionview//lib/action_view/buffers.rb#151 def initialize(buffer); end # source://actionview//lib/action_view/buffers.rb#155 def <<(value); end # source://actionview//lib/action_view/buffers.rb#161 def raw; end end # = Action View \Record \Identifier # # RecordIdentifier encapsulates methods used by various ActionView helpers # to associate records with DOM elements. # # Consider for example the following code that form of post: # # <%= form_with(model: post) do |f| %> # <%= f.text_field :body %> # <% end %> # # When +post+ is a new, unsaved ActiveRecord::Base instance, the resulting HTML # is: # #
    # #
    # # When +post+ is a persisted ActiveRecord::Base instance, the resulting HTML # is: # #
    # #
    # # In both cases, the +id+ and +class+ of the wrapping DOM element are # automatically generated, following naming conventions encapsulated by the # RecordIdentifier methods #dom_id and #dom_class: # # dom_id(Post) # => "new_post" # dom_class(Post) # => "post" # dom_id(Post.new) # => "new_post" # dom_class(Post.new) # => "post" # dom_id(Post.find 42) # => "post_42" # dom_class(Post.find 42) # => "post" # # Note that these methods do not strictly require +Post+ to be a subclass of # ActiveRecord::Base. # Any +Post+ class will work as long as its instances respond to +to_key+ # and +model_name+, given that +model_name+ responds to +param_key+. # For instance: # # class Post # attr_accessor :to_key # # def model_name # OpenStruct.new param_key: 'post' # end # # def self.find(id) # new.tap { |post| post.to_key = [id] } # end # end # # source://actionview//lib/action_view/record_identifier.rb#60 module ActionView::RecordIdentifier include ::ActionView::ModelNaming extend ::ActionView::RecordIdentifier extend ::ActionView::ModelNaming # The DOM class convention is to use the singular form of an object or class. # # dom_class(post) # => "post" # dom_class(Person) # => "person" # # If you need to address multiple instances of the same class in the same view, you can prefix the dom_class: # # dom_class(post, :edit) # => "edit_post" # dom_class(Person, :edit) # => "edit_person" # # source://actionview//lib/action_view/record_identifier.rb#78 def dom_class(record_or_class, prefix = T.unsafe(nil)); end # The DOM id convention is to use the singular form of an object or class with the id following an underscore. # If no id is found, prefix with "new_" instead. # # dom_id(Post.find(45)) # => "post_45" # dom_id(Post) # => "new_post" # # If you need to address multiple instances of the same class in the same view, you can prefix the dom_id: # # dom_id(Post.find(45), :edit) # => "edit_post_45" # dom_id(Post, :custom) # => "custom_post" # # @raise [ArgumentError] # # source://actionview//lib/action_view/record_identifier.rb#93 def dom_id(record_or_class, prefix = T.unsafe(nil)); end private # Returns a string representation of the key attribute(s) that is suitable for use in an HTML DOM id. # This can be overwritten to customize the default generated string representation if desired. # If you need to read back a key from a dom_id in order to query for the underlying database record, # you should write a helper like 'person_record_from_dom_id' that will extract the key either based # on the default implementation (which just joins all key attributes with '_') or on your own # overwritten version of the method. By default, this implementation passes the key string through a # method that replaces all characters that are invalid inside DOM ids, with valid ones. You need to # make sure yourself that your dom ids are valid, in case you override this method. # # source://actionview//lib/action_view/record_identifier.rb#113 def record_key_for_dom_id(record); end end # source://actionview//lib/action_view/record_identifier.rb#66 ActionView::RecordIdentifier::JOIN = T.let(T.unsafe(nil), String) # source://actionview//lib/action_view/record_identifier.rb#67 ActionView::RecordIdentifier::NEW = T.let(T.unsafe(nil), String) # source://actionview//lib/action_view/render_parser.rb#4 module ActionView::RenderParser; end # source://actionview//lib/action_view/render_parser.rb#5 ActionView::RenderParser::ALL_KNOWN_KEYS = T.let(T.unsafe(nil), Array) # source://actionview//lib/action_view/render_parser.rb#8 class ActionView::RenderParser::Base # @return [Base] a new instance of Base # # source://actionview//lib/action_view/render_parser.rb#9 def initialize(name, code); end private # source://actionview//lib/action_view/render_parser.rb#15 def directory; end # source://actionview//lib/action_view/render_parser.rb#19 def partial_to_virtual_path(render_type, partial_path); end end # source://actionview//lib/action_view/render_parser.rb#37 ActionView::RenderParser::Default = ActionView::RenderParser::PrismRenderParser # source://actionview//lib/action_view/render_parser/prism_render_parser.rb#5 class ActionView::RenderParser::PrismRenderParser < ::ActionView::RenderParser::Base # source://actionview//lib/action_view/render_parser/prism_render_parser.rb#6 def render_calls; end private # Accept a call node and return a hash of options for the render call. # If it doesn't match the expected format, return nil. # # source://actionview//lib/action_view/render_parser/prism_render_parser.rb#43 def render_call_options(node); end # Accept the node that is being passed in the position of the template # and return the template name and whether or not it is an object # template. # # source://actionview//lib/action_view/render_parser/prism_render_parser.rb#97 def render_call_template(node); end end # source://actionview//lib/action_view/render_parser.rb#6 ActionView::RenderParser::RENDER_TYPE_KEYS = T.let(T.unsafe(nil), Array) # = Action View \Renderer # # This is the main entry point for rendering. It basically delegates # to other objects like TemplateRenderer and PartialRenderer which # actually renders the template. # # The Renderer will parse the options from the +render+ or +render_body+ # method and render a partial or a template based on the options. The # +TemplateRenderer+ and +PartialRenderer+ objects are wrappers which do all # the setup and logic necessary to render a view and a new object is created # each time +render+ is called. # # source://actionview//lib/action_view/renderer/renderer.rb#15 class ActionView::Renderer # @return [Renderer] a new instance of Renderer # # source://actionview//lib/action_view/renderer/renderer.rb#18 def initialize(lookup_context); end # source://actionview//lib/action_view/renderer/renderer.rb#52 def cache_hits; end # Returns the value of attribute lookup_context. # # source://actionview//lib/action_view/renderer/renderer.rb#16 def lookup_context; end # Sets the attribute lookup_context # # @param value the value to set the attribute lookup_context to. # # source://actionview//lib/action_view/renderer/renderer.rb#16 def lookup_context=(_arg0); end # Main render entry point shared by Action View and Action Controller. # # source://actionview//lib/action_view/renderer/renderer.rb#23 def render(context, options); end # Render but returns a valid Rack body. If fibers are defined, we return # a streaming body that renders the template piece by piece. # # Note that partials are not supported to be rendered with streaming, # so in such cases, we just wrap them in an array. # # source://actionview//lib/action_view/renderer/renderer.rb#40 def render_body(context, options); end # source://actionview//lib/action_view/renderer/renderer.rb#48 def render_partial(context, options, &block); end # source://actionview//lib/action_view/renderer/renderer.rb#27 def render_to_object(context, options); end private # source://actionview//lib/action_view/renderer/renderer.rb#103 def collection_from_object(object); end # source://actionview//lib/action_view/renderer/renderer.rb#96 def collection_from_options(options); end # source://actionview//lib/action_view/renderer/renderer.rb#61 def render_partial_to_object(context, options, &block); end # source://actionview//lib/action_view/renderer/renderer.rb#57 def render_template_to_object(context, options); end end # source://actionview//lib/action_view/rendering.rb#26 module ActionView::Rendering extend ::ActiveSupport::Concern include ::ActionView::ViewPaths mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods mixes_in_class_methods ::ActionView::Rendering::ClassMethods # source://actionview//lib/action_view/rendering.rb#32 def initialize; end # Override process to set up I18n proxy. # # source://actionview//lib/action_view/rendering.rb#38 def process(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/rendering.rb#119 def render_to_body(options = T.unsafe(nil)); end def rendered_format; end # An instance of a view class. The default view class is ActionView::Base. # # The view class must have the following methods: # # * View.new(lookup_context, assigns, controller) — Create a new # ActionView instance for a controller and we can also pass the arguments. # # * View#render(option) — Returns String with the rendered template. # # Override this method in a module to change the default behavior. # # source://actionview//lib/action_view/rendering.rb#109 def view_context; end # source://actionview//lib/action_view/rendering.rb#95 def view_context_class; end # Returns an object that is able to render templates. # # source://actionview//lib/action_view/rendering.rb#114 def view_renderer; end private # Normalize args by converting render "foo" to render action: "foo" and # render "foo/bar" to render template: "foo/bar". # # source://actionview//lib/action_view/rendering.rb#153 def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end # Assign the rendered format to look up context. # # source://actionview//lib/action_view/rendering.rb#146 def _process_format(format); end # Normalize options. # # source://actionview//lib/action_view/rendering.rb#177 def _process_render_template_options(options); end # Find and render a template based on the options given. # # source://actionview//lib/action_view/rendering.rb#127 def _render_template(options); end end # source://actionview//lib/action_view/rendering.rb#45 module ActionView::Rendering::ClassMethods # source://actionview//lib/action_view/rendering.rb#49 def _helpers; end # source://actionview//lib/action_view/rendering.rb#46 def _routes; end # source://actionview//lib/action_view/rendering.rb#59 def build_view_context_class(klass, supports_path, routes, helpers); end # source://actionview//lib/action_view/rendering.rb#76 def eager_load!; end # @return [Boolean] # # source://actionview//lib/action_view/rendering.rb#52 def inherit_view_context_class?; end # source://actionview//lib/action_view/rendering.rb#82 def view_context_class; end end # = Action View Resolver # # source://actionview//lib/action_view/template/resolver.rb#11 class ActionView::Resolver # source://actionview//lib/action_view/template/resolver.rb#69 def all_template_paths; end # source://actionview//lib/action_view/template/resolver.rb#64 def built_templates; end # source://actionview//lib/action_view/template/resolver.rb#50 def caching; end # source://actionview//lib/action_view/template/resolver.rb#50 def caching=(val); end # source://actionview//lib/action_view/template/resolver.rb#79 def caching?(&_arg0); end # source://actionview//lib/action_view/template/resolver.rb#56 def clear_cache; end # Normalizes the arguments and passes it on to find_templates. # # source://actionview//lib/action_view/template/resolver.rb#60 def find_all(name, prefix = T.unsafe(nil), partial = T.unsafe(nil), details = T.unsafe(nil), key = T.unsafe(nil), locals = T.unsafe(nil)); end private # source://actionview//lib/action_view/template/resolver.rb#75 def _find_all(name, prefix, partial, details, key, locals); end # This is what child classes implement. No defaults are needed # because Resolver guarantees that the arguments are present and # normalized. # # @raise [NotImplementedError] # # source://actionview//lib/action_view/template/resolver.rb#84 def find_templates(name, prefix, partial, details, locals = T.unsafe(nil)); end class << self # source://actionview//lib/action_view/template/resolver.rb#50 def caching; end # source://actionview//lib/action_view/template/resolver.rb#50 def caching=(val); end # source://actionview//lib/action_view/template/resolver.rb#50 def caching?; end end end # source://actionview//lib/action_view/template/resolver.rb#12 class ActionView::Resolver::PathParser # source://actionview//lib/action_view/template/resolver.rb#15 def build_path_regex; end # source://actionview//lib/action_view/template/resolver.rb#36 def parse(path); end end # source://actionview//lib/action_view/template/resolver.rb#13 class ActionView::Resolver::PathParser::ParsedPath < ::Struct # Returns the value of attribute details # # @return [Object] the current value of details def details; end # Sets the attribute details # # @param value [Object] the value to set the attribute details to. # @return [Object] the newly set value def details=(_); end # Returns the value of attribute path # # @return [Object] the current value of path def path; end # Sets the attribute path # # @param value [Object] the value to set the attribute path to. # @return [Object] the newly set value def path=(_); end class << self def [](*_arg0); end def inspect; end def keyword_init?; end def members; end def new(*_arg0); end end end # source://actionview//lib/action_view/routing_url_for.rb#6 module ActionView::RoutingUrlFor # Returns the URL for the set of +options+ provided. This takes the # same options as +url_for+ in Action Controller (see the # documentation for ActionDispatch::Routing::UrlFor#url_for). Note that by default # :only_path is true so you'll get the relative "/controller/action" # instead of the fully qualified URL like "http://example.com/controller/action". # # ==== Options # * :anchor - Specifies the anchor name to be appended to the path. # * :only_path - If true, returns the relative URL (omitting the protocol, host name, and port) (true by default unless :host is specified). # * :trailing_slash - If true, adds a trailing slash, as in "/archive/2005/". Note that this # is currently not recommended since it breaks caching. # * :host - Overrides the default (current) host if provided. # * :protocol - Overrides the default (current) protocol if provided. # * :user - Inline HTTP authentication (only plucked out if :password is also present). # * :password - Inline HTTP authentication (only plucked out if :user is also present). # # ==== Relying on named routes # # Passing a record (like an Active Record) instead of a hash as the options parameter will # trigger the named route for that record. The lookup will happen on the name of the class. So passing a # Workshop object will attempt to use the +workshop_path+ route. If you have a nested route, such as # +admin_workshop_path+ you'll have to call that explicitly (it's impossible for +url_for+ to guess that route). # # ==== Implicit Controller Namespacing # # Controllers passed in using the +:controller+ option will retain their namespace unless it is an absolute one. # # ==== Examples # <%= url_for(action: 'index') %> # # => /blogs/ # # <%= url_for(action: 'find', controller: 'books') %> # # => /books/find # # <%= url_for(action: 'login', controller: 'members', only_path: false, protocol: 'https') %> # # => https://www.example.com/members/login/ # # <%= url_for(action: 'play', anchor: 'player') %> # # => /messages/play/#player # # <%= url_for(action: 'jump', anchor: 'tax&ship') %> # # => /testing/jump/#tax&ship # # <%= url_for(Workshop) %> # # => /workshops # # <%= url_for(Workshop.new) %> # # relies on Workshop answering a persisted? call (and in this case returning false) # # => /workshops # # <%= url_for(@workshop) %> # # calls @workshop.to_param which by default returns the id # # => /workshops/5 # # # to_param can be re-defined in a model to provide different URL names: # # => /workshops/1-workshop-name # # <%= url_for("http://www.example.com") %> # # => http://www.example.com # # <%= url_for(:back) %> # # if request.env["HTTP_REFERER"] is set to "http://www.example.com" # # => http://www.example.com # # <%= url_for(:back) %> # # if request.env["HTTP_REFERER"] is not set or is blank # # => javascript:history.back() # # <%= url_for(action: 'index', controller: 'users') %> # # Assuming an "admin" namespace # # => /admin/users # # <%= url_for(action: 'index', controller: '/users') %> # # Specify absolute path with beginning slash # # => /users # # source://actionview//lib/action_view/routing_url_for.rb#82 def url_for(options = T.unsafe(nil)); end # source://actionview//lib/action_view/routing_url_for.rb#124 def url_options; end private # source://actionview//lib/action_view/routing_url_for.rb#139 def _generate_paths_by_default; end # source://actionview//lib/action_view/routing_url_for.rb#130 def _routes_context; end # source://actionview//lib/action_view/routing_url_for.rb#143 def ensure_only_path_option(options); end # @return [Boolean] # # source://actionview//lib/action_view/routing_url_for.rb#134 def optimize_routes_generation?; end end # source://actionview//lib/action_view/buffers.rb#108 class ActionView::StreamingBuffer # @return [StreamingBuffer] a new instance of StreamingBuffer # # source://actionview//lib/action_view/buffers.rb#109 def initialize(block); end # source://actionview//lib/action_view/buffers.rb#113 def <<(value); end # source://actionview//lib/action_view/buffers.rb#113 def append=(value); end # Returns the value of attribute block. # # source://actionview//lib/action_view/buffers.rb#147 def block; end # source://actionview//lib/action_view/buffers.rb#126 def capture; end # source://actionview//lib/action_view/buffers.rb#113 def concat(value); end # source://actionview//lib/action_view/buffers.rb#139 def html_safe; end # @return [Boolean] # # source://actionview//lib/action_view/buffers.rb#135 def html_safe?; end # source://actionview//lib/action_view/buffers.rb#143 def raw; end # source://actionview//lib/action_view/buffers.rb#121 def safe_append=(value); end # source://actionview//lib/action_view/buffers.rb#121 def safe_concat(value); end end # source://actionview//lib/action_view/flows.rb#30 class ActionView::StreamingFlow < ::ActionView::OutputFlow # @return [StreamingFlow] a new instance of StreamingFlow # # source://actionview//lib/action_view/flows.rb#31 def initialize(view, fiber); end # Appends the contents for the given key. This is called # by providing and resuming back to the fiber, # if that's the key it's waiting for. # # source://actionview//lib/action_view/flows.rb#65 def append!(key, value); end # Try to get stored content. If the content # is not available and we're inside the layout fiber, # then it will begin waiting for the given key and yield. # # source://actionview//lib/action_view/flows.rb#43 def get(key); end private # @return [Boolean] # # source://actionview//lib/action_view/flows.rb#71 def inside_fiber?; end end # == TODO # # * Support streaming from child templates, partials and so on. # * Rack::Cache needs to support streaming bodies # # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#12 class ActionView::StreamingTemplateRenderer < ::ActionView::TemplateRenderer # For streaming, instead of rendering a given a template, we return a Body # object that responds to each. This object is initialized with a block # that knows how to render the template. # # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#44 def render_template(view, template, layout_name = T.unsafe(nil), locals = T.unsafe(nil)); end private # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#56 def delayed_render(buffer, template, layout, view, locals); end end # A valid Rack::Body (i.e. it responds to each). # It is initialized with a block that, when called, starts # rendering the template. # # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#13 class ActionView::StreamingTemplateRenderer::Body # @return [Body] a new instance of Body # # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#14 def initialize(&start); end # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#18 def each(&block); end private # This is the same logging logic as in ShowExceptions middleware. # # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#30 def log_error(exception); end end # source://actionview//lib/action_view/template/error.rb#245 class ActionView::SyntaxErrorInTemplate < ::ActionView::Template::Error # @return [SyntaxErrorInTemplate] a new instance of SyntaxErrorInTemplate # # source://actionview//lib/action_view/template/error.rb#246 def initialize(template, offending_code_string); end # source://actionview//lib/action_view/template/error.rb#257 def annotated_source_code; end # source://actionview//lib/action_view/template/error.rb#251 def message; end end # = Action View \Template # # source://actionview//lib/action_view/template.rb#7 class ActionView::Template extend ::ActiveSupport::Autoload extend ::ActionView::Template::Handlers # @return [Template] a new instance of Template # # source://actionview//lib/action_view/template.rb#199 def initialize(source, identifier, handler, locals:, format: T.unsafe(nil), variant: T.unsafe(nil), virtual_path: T.unsafe(nil)); end # This method is responsible for properly setting the encoding of the # source. Until this point, we assume that the source is BINARY data. # If no additional information is supplied, we assume the encoding is # the same as Encoding.default_external. # # The user can also specify the encoding via a comment on the first # with any template engine, as we process out the encoding comment # before passing the source on to the template engine, leaving a # blank line in its stead. # # source://actionview//lib/action_view/template.rb#321 def encode!; end # Returns the value of attribute format. # # source://actionview//lib/action_view/template.rb#195 def format; end # Returns the value of attribute handler. # # source://actionview//lib/action_view/template.rb#194 def handler; end # Returns the value of attribute identifier. # # source://actionview//lib/action_view/template.rb#194 def identifier; end # source://actionview//lib/action_view/template.rb#300 def inspect; end # The locals this template has been or will be compiled for, or nil if this # is a strict locals template. # # source://actionview//lib/action_view/template.rb#223 def locals; end # Exceptions are marshalled when using the parallel test runner with DRb, so we need # to ensure that references to the template object can be marshalled as well. This means forgoing # the marshalling of the compiler mutex and instantiating that again on unmarshalling. # # source://actionview//lib/action_view/template.rb#387 def marshal_dump; end # source://actionview//lib/action_view/template.rb#391 def marshal_load(array); end # source://actionview//lib/action_view/template.rb#396 def method_name; end # Render a template. If the template was not compiled yet, it is done # exactly before rendering. # # This method is instrumented as "!render_template.action_view". Notice that # we use a bang in this instrumentation because you don't want to # consume this in production. This is only slow if it's being listened to. # # source://actionview//lib/action_view/template.rb#271 def render(view, locals, buffer = T.unsafe(nil), implicit_locals: T.unsafe(nil), add_to_stack: T.unsafe(nil), &block); end # source://actionview//lib/action_view/template.rb#296 def short_identifier; end # source://actionview//lib/action_view/template.rb#304 def source; end # source://actionview//lib/action_view/template.rb#231 def spot(location); end # This method is responsible for marking a template as having strict locals # which means the template can only accept the locals defined in a magic # comment. For example, if your template accepts the locals +title+ and # +comment_count+, add the following to your template file: # # <%# locals: (title: "Default title", comment_count: 0) %> # # Strict locals are useful for validating template arguments and for # specifying defaults. # # source://actionview//lib/action_view/template.rb#366 def strict_locals!; end # Returns whether a template is using strict locals. # # @return [Boolean] # # source://actionview//lib/action_view/template.rb#380 def strict_locals?; end # Returns whether the underlying handler supports streaming. If so, # a streaming buffer *may* be passed when it starts rendering. # # @return [Boolean] # # source://actionview//lib/action_view/template.rb#261 def supports_streaming?; end # Translate an error location returned by ErrorHighlight to the correct # source location inside the template. # # source://actionview//lib/action_view/template.rb#251 def translate_location(backtrace_location, spot); end # source://actionview//lib/action_view/template.rb#292 def type; end # Returns the value of attribute variable. # # source://actionview//lib/action_view/template.rb#195 def variable; end # Returns the value of attribute variant. # # source://actionview//lib/action_view/template.rb#195 def variant; end # Returns the value of attribute virtual_path. # # source://actionview//lib/action_view/template.rb#195 def virtual_path; end private # Among other things, this method is responsible for properly setting # the encoding of the compiled template. # # If the template engine handles encodings, we send the encoded # String to the engine without further processing. This allows # the template engine to support additional mechanisms for # # Otherwise, after we figure out the correct encoding, we then # encode the source into Encoding.default_internal. # In general, this means that templates will be UTF-8 inside of Rails, # regardless of the original source encoding. # # source://actionview//lib/action_view/template.rb#500 def compile(mod); end # Compile a template. This method ensures a template is compiled # just once and removes the source after it is compiled. # # source://actionview//lib/action_view/template.rb#418 def compile!(view); end # This method compiles the source of the template. The compilation of templates # involves setting strict_locals! if applicable, encoding the template, and setting # frozen string literal. # # source://actionview//lib/action_view/template.rb#443 def compiled_source; end # source://actionview//lib/action_view/template.rb#405 def find_node_by_id(node, node_id); end # source://actionview//lib/action_view/template.rb#549 def handle_render_error(view, e); end # source://actionview//lib/action_view/template.rb#574 def identifier_method_name; end # source://actionview//lib/action_view/template.rb#578 def instrument(action, &block); end # source://actionview//lib/action_view/template.rb#586 def instrument_payload; end # source://actionview//lib/action_view/template.rb#582 def instrument_render_template(&block); end # source://actionview//lib/action_view/template.rb#561 def locals_code; end # source://actionview//lib/action_view/template.rb#541 def offset; end class << self # source://actionview//lib/action_view/template.rb#180 def frozen_string_literal; end # source://actionview//lib/action_view/template.rb#180 def frozen_string_literal=(_arg0); end # source://actionview//lib/action_view/template.rb#184 def mime_types_implementation=(implementation); end end end # The Template::Error exception is raised when the compilation or rendering of the template # fails. This exception then gathers a bunch of intimate details and uses it to report a # precise exception message. # # source://actionview//lib/action_view/template/error.rb#154 class ActionView::Template::Error < ::ActionView::ActionViewError # @return [Error] a new instance of Error # # source://actionview//lib/action_view/template/error.rb#162 def initialize(template); end # source://actionview//lib/action_view/template/error.rb#220 def annotated_source_code; end # source://actionview//lib/action_view/template/error.rb#171 def backtrace; end # source://actionview//lib/action_view/template/error.rb#175 def backtrace_locations; end # Override to prevent #cause resetting during re-raise. # # source://actionview//lib/action_view/template/error.rb#158 def cause; end # source://actionview//lib/action_view/template/error.rb#179 def file_name; end # source://actionview//lib/action_view/template/error.rb#212 def line_number; end # source://actionview//lib/action_view/template/error.rb#192 def source_extract(indentation = T.unsafe(nil)); end # source://actionview//lib/action_view/template/error.rb#183 def sub_template_message; end # source://actionview//lib/action_view/template/error.rb#207 def sub_template_of(template_path); end # Returns the value of attribute template. # # source://actionview//lib/action_view/template/error.rb#160 def template; end private # source://actionview//lib/action_view/template/error.rb#233 def formatted_code_for(source_code, line_counter, indent); end # source://actionview//lib/action_view/template/error.rb#225 def source_location; end end # source://actionview//lib/action_view/template/error.rb#155 ActionView::Template::Error::SOURCE_CODE_RADIUS = T.let(T.unsafe(nil), Integer) # = Action View HTML Template # # source://actionview//lib/action_view/template/html.rb#6 class ActionView::Template::HTML # @return [HTML] a new instance of HTML # # source://actionview//lib/action_view/template/html.rb#9 def initialize(string, type); end # source://actionview//lib/action_view/template/html.rb#28 def format; end # source://actionview//lib/action_view/template/html.rb#14 def identifier; end # source://actionview//lib/action_view/template/html.rb#14 def inspect; end # source://actionview//lib/action_view/template/html.rb#24 def render(*args); end # source://actionview//lib/action_view/template/html.rb#20 def to_str; end # source://actionview//lib/action_view/template/html.rb#7 def type; end end # = Action View Template Handlers # # source://actionview//lib/action_view/template/handlers.rb#6 module ActionView::Template::Handlers # source://actionview//lib/action_view/template/handlers.rb#61 def handler_for_extension(extension); end # source://actionview//lib/action_view/template/handlers.rb#56 def register_default_template_handler(extension, klass); end # Register an object that knows how to handle template files with the given # extensions. This can be used to implement new template types. # The handler must respond to +:call+, which will be passed the template # and should return the rendered template as a String. # # @raise [ArgumentError] # # source://actionview//lib/action_view/template/handlers.rb#31 def register_template_handler(*extensions, handler); end # source://actionview//lib/action_view/template/handlers.rb#52 def registered_template_handler(extension); end # source://actionview//lib/action_view/template/handlers.rb#48 def template_handler_extensions; end # Opposite to register_template_handler. # # source://actionview//lib/action_view/template/handlers.rb#40 def unregister_template_handler(*extensions); end class << self # @private # # source://actionview//lib/action_view/template/handlers.rb#12 def extended(base); end # source://actionview//lib/action_view/template/handlers.rb#23 def extensions; end end end # source://actionview//lib/action_view/template/handlers/builder.rb#5 class ActionView::Template::Handlers::Builder # source://actionview//lib/action_view/template/handlers/builder.rb#8 def call(template, source); end # source://actionview//lib/action_view/template/handlers/builder.rb#6 def default_format; end # source://actionview//lib/action_view/template/handlers/builder.rb#6 def default_format=(_arg0); end # source://actionview//lib/action_view/template/handlers/builder.rb#6 def default_format?; end private # source://actionview//lib/action_view/template/handlers/builder.rb#17 def require_engine; end class << self # source://actionview//lib/action_view/template/handlers/builder.rb#6 def default_format; end # source://actionview//lib/action_view/template/handlers/builder.rb#6 def default_format=(value); end # source://actionview//lib/action_view/template/handlers/builder.rb#6 def default_format?; end private # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15 def __class_attr_default_format; end # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17 def __class_attr_default_format=(new_value); end end end # source://actionview//lib/action_view/template/handlers/erb.rb#9 class ActionView::Template::Handlers::ERB # source://actionview//lib/action_view/template/handlers/erb.rb#63 def call(template, source); end # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation; end # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation=(_arg0); end # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation?; end # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode; end # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode=(_arg0); end # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode?; end # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list; end # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list=(_arg0); end # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list?; end # @return [Boolean] # # source://actionview//lib/action_view/template/handlers/erb.rb#37 def handles_encoding?; end # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines; end # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines=(_arg0); end # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines?; end # @return [Boolean] # # source://actionview//lib/action_view/template/handlers/erb.rb#33 def supports_streaming?; end # Translate an error location returned by ErrorHighlight to the correct # source location inside the template. # # source://actionview//lib/action_view/template/handlers/erb.rb#43 def translate_location(spot, backtrace_location, source); end private # Find which token in the source template spans the byte range that # contains the error_column, then return the offset compared to the # original source template. # # Iterate consecutive pairs of CODE or TEXT tokens, requiring # a match of the first token before matching either token. # # For example, if we want to find tokens A, B, C, we do the following: # 1. Find a match for A: test error_column or advance scanner. # 2. Find a match for B or A: # a. If B: start over with next token set (B, C). # b. If A: test error_column or advance scanner. # c. Otherwise: Advance 1 byte # # Prioritize matching the next token over the current token once # a match for the current token has been found. This is to prevent # the current token from looping past the next token if they both # match (i.e. if the current token is a single space character). # # @raise [LocationParsingError] # # source://actionview//lib/action_view/template/handlers/erb.rb#128 def find_offset(compiled, source_tokens, error_column); end # source://actionview//lib/action_view/template/handlers/erb.rb#153 def offset_source_tokens(source_tokens); end # @raise [WrongEncodingError] # # source://actionview//lib/action_view/template/handlers/erb.rb#95 def valid_encoding(string, encoding); end class << self # source://actionview//lib/action_view/template/handlers/erb.rb#29 def call(template, source); end # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation; end # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation=(value); end # source://actionview//lib/action_view/template/handlers/erb.rb#17 def erb_implementation?; end # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode; end # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode=(value); end # source://actionview//lib/action_view/template/handlers/erb.rb#14 def erb_trim_mode?; end # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list; end # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list=(value); end # source://actionview//lib/action_view/template/handlers/erb.rb#20 def escape_ignore_list?; end # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines; end # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines=(value); end # source://actionview//lib/action_view/template/handlers/erb.rb#23 def strip_trailing_newlines?; end private # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15 def __class_attr_erb_implementation; end # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17 def __class_attr_erb_implementation=(new_value); end # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15 def __class_attr_erb_trim_mode; end # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17 def __class_attr_erb_trim_mode=(new_value); end # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15 def __class_attr_escape_ignore_list; end # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17 def __class_attr_escape_ignore_list=(new_value); end # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#15 def __class_attr_strip_trailing_newlines; end # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17 def __class_attr_strip_trailing_newlines=(new_value); end end end # source://actionview//lib/action_view/template/handlers/erb.rb#25 ActionView::Template::Handlers::ERB::ENCODING_TAG = T.let(T.unsafe(nil), Regexp) # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#9 class ActionView::Template::Handlers::ERB::Erubi < ::Erubi::Engine # @return [Erubi] a new instance of Erubi # # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#11 def initialize(input, properties = T.unsafe(nil)); end private # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#65 def add_code(code); end # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#47 def add_expression(indicator, code); end # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#70 def add_postamble(_); end # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#30 def add_text(text); end # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#75 def flush_newline_if_pending(src); end end # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#45 ActionView::Template::Handlers::ERB::Erubi::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) # source://actionview//lib/action_view/template/handlers/erb.rb#27 class ActionView::Template::Handlers::ERB::LocationParsingError < ::StandardError; end # source://actionview//lib/action_view/template/handlers/html.rb#5 class ActionView::Template::Handlers::Html < ::ActionView::Template::Handlers::Raw # source://actionview//lib/action_view/template/handlers/html.rb#6 def call(template, source); end end # source://actionview//lib/action_view/template/handlers/raw.rb#5 class ActionView::Template::Handlers::Raw # source://actionview//lib/action_view/template/handlers/raw.rb#6 def call(template, source); end end # source://actionview//lib/action_view/template/inline.rb#7 class ActionView::Template::Inline < ::ActionView::Template # source://actionview//lib/action_view/template/inline.rb#16 def compile(mod); end end # This finalizer is needed (and exactly with a proc inside another proc) # otherwise templates leak in development. # # source://actionview//lib/action_view/template/inline.rb#8 ActionView::Template::Inline::Finalizer = T.let(T.unsafe(nil), Proc) # source://actionview//lib/action_view/template.rb#308 ActionView::Template::LEADING_ENCODING_REGEXP = T.let(T.unsafe(nil), Regexp) # source://actionview//lib/action_view/template.rb#197 ActionView::Template::NONE = T.let(T.unsafe(nil), Object) # source://actionview//lib/action_view/template.rb#558 ActionView::Template::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) # = Action View RawFile Template # # source://actionview//lib/action_view/template/raw_file.rb#6 class ActionView::Template::RawFile # @return [RawFile] a new instance of RawFile # # source://actionview//lib/action_view/template/raw_file.rb#9 def initialize(filename); end # source://actionview//lib/action_view/template/raw_file.rb#7 def format; end # source://actionview//lib/action_view/template/raw_file.rb#7 def format=(_arg0); end # source://actionview//lib/action_view/template/raw_file.rb#16 def identifier; end # source://actionview//lib/action_view/template/raw_file.rb#20 def render(*args); end # source://actionview//lib/action_view/template/raw_file.rb#7 def type; end # source://actionview//lib/action_view/template/raw_file.rb#7 def type=(_arg0); end end # = Action View Renderable Template for objects that respond to #render_in # # source://actionview//lib/action_view/template/renderable.rb#6 class ActionView::Template::Renderable # @return [Renderable] a new instance of Renderable # # source://actionview//lib/action_view/template/renderable.rb#7 def initialize(renderable); end # source://actionview//lib/action_view/template/renderable.rb#25 def format; end # source://actionview//lib/action_view/template/renderable.rb#11 def identifier; end # source://actionview//lib/action_view/template/renderable.rb#15 def render(context, *args); end end # source://actionview//lib/action_view/template.rb#10 ActionView::Template::STRICT_LOCALS_REGEX = T.let(T.unsafe(nil), Regexp) # SimpleType is mostly just a stub implementation for when Action View # is used without Action Dispatch. # # source://actionview//lib/action_view/template/types.rb#9 class ActionView::Template::SimpleType # @return [SimpleType] a new instance of SimpleType # # source://actionview//lib/action_view/template/types.rb#29 def initialize(symbol); end # source://actionview//lib/action_view/template/types.rb#43 def ==(type); end # source://actionview//lib/action_view/template/types.rb#38 def ref; end # Returns the value of attribute symbol. # # source://actionview//lib/action_view/template/types.rb#27 def symbol; end # source://actionview//lib/action_view/template/types.rb#33 def to_s; end # source://actionview//lib/action_view/template/types.rb#33 def to_str; end # source://actionview//lib/action_view/template/types.rb#38 def to_sym; end class << self # source://actionview//lib/action_view/template/types.rb#14 def [](type); end # Returns the value of attribute symbols. # # source://actionview//lib/action_view/template/types.rb#12 def symbols; end # :nodoc # # @return [Boolean] # # source://actionview//lib/action_view/template/types.rb#22 def valid_symbols?(symbols); end end end # source://actionview//lib/action_view/template/sources.rb#5 module ActionView::Template::Sources extend ::ActiveSupport::Autoload end # source://actionview//lib/action_view/template/sources/file.rb#6 class ActionView::Template::Sources::File # @return [File] a new instance of File # # source://actionview//lib/action_view/template/sources/file.rb#7 def initialize(filename); end # source://actionview//lib/action_view/template/sources/file.rb#11 def to_s; end end # = Action View Text Template # # source://actionview//lib/action_view/template/text.rb#6 class ActionView::Template::Text # @return [Text] a new instance of Text # # source://actionview//lib/action_view/template/text.rb#9 def initialize(string); end # source://actionview//lib/action_view/template/text.rb#27 def format; end # source://actionview//lib/action_view/template/text.rb#13 def identifier; end # source://actionview//lib/action_view/template/text.rb#13 def inspect; end # source://actionview//lib/action_view/template/text.rb#23 def render(*args); end # source://actionview//lib/action_view/template/text.rb#19 def to_str; end # source://actionview//lib/action_view/template/text.rb#7 def type; end # source://actionview//lib/action_view/template/text.rb#7 def type=(_arg0); end end # source://actionview//lib/action_view/template.rb#189 ActionView::Template::Types = Mime # source://actionview//lib/action_view/template_details.rb#4 class ActionView::TemplateDetails # @return [TemplateDetails] a new instance of TemplateDetails # # source://actionview//lib/action_view/template_details.rb#35 def initialize(locale, handler, format, variant); end # Returns the value of attribute format. # # source://actionview//lib/action_view/template_details.rb#33 def format; end # source://actionview//lib/action_view/template_details.rb#62 def format_or_default; end # Returns the value of attribute handler. # # source://actionview//lib/action_view/template_details.rb#33 def handler; end # source://actionview//lib/action_view/template_details.rb#58 def handler_class; end # Returns the value of attribute locale. # # source://actionview//lib/action_view/template_details.rb#33 def locale; end # @return [Boolean] # # source://actionview//lib/action_view/template_details.rb#42 def matches?(requested); end # source://actionview//lib/action_view/template_details.rb#49 def sort_key_for(requested); end # Returns the value of attribute variant. # # source://actionview//lib/action_view/template_details.rb#33 def variant; end end # source://actionview//lib/action_view/template_details.rb#5 class ActionView::TemplateDetails::Requested # @return [Requested] a new instance of Requested # # source://actionview//lib/action_view/template_details.rb#11 def initialize(locale:, handlers:, formats:, variants:); end # Returns the value of attribute formats. # # source://actionview//lib/action_view/template_details.rb#6 def formats; end # Returns the value of attribute formats_idx. # # source://actionview//lib/action_view/template_details.rb#7 def formats_idx; end # Returns the value of attribute handlers. # # source://actionview//lib/action_view/template_details.rb#6 def handlers; end # Returns the value of attribute handlers_idx. # # source://actionview//lib/action_view/template_details.rb#7 def handlers_idx; end # Returns the value of attribute locale. # # source://actionview//lib/action_view/template_details.rb#6 def locale; end # Returns the value of attribute locale_idx. # # source://actionview//lib/action_view/template_details.rb#7 def locale_idx; end # Returns the value of attribute variants. # # source://actionview//lib/action_view/template_details.rb#6 def variants; end # Returns the value of attribute variants_idx. # # source://actionview//lib/action_view/template_details.rb#7 def variants_idx; end private # source://actionview//lib/action_view/template_details.rb#28 def build_idx_hash(arr); end end # source://actionview//lib/action_view/template_details.rb#9 ActionView::TemplateDetails::Requested::ANY_HASH = T.let(T.unsafe(nil), Hash) # source://actionview//lib/action_view/template/error.rb#243 ActionView::TemplateError = ActionView::Template::Error # = Action View \TemplatePath # # Represents a template path within ActionView's lookup and rendering system, # like "users/show" # # TemplatePath makes it convenient to convert between separate name, prefix, # partial arguments and the virtual path. # # source://actionview//lib/action_view/template_path.rb#11 class ActionView::TemplatePath # @return [TemplatePath] a new instance of TemplatePath # # source://actionview//lib/action_view/template_path.rb#47 def initialize(name, prefix, partial, virtual); end # @return [Boolean] # # source://actionview//lib/action_view/template_path.rb#61 def ==(other); end # @return [Boolean] # # source://actionview//lib/action_view/template_path.rb#61 def eql?(other); end # source://actionview//lib/action_view/template_path.rb#57 def hash; end # Returns the value of attribute name. # # source://actionview//lib/action_view/template_path.rb#12 def name; end # Returns the value of attribute partial. # # source://actionview//lib/action_view/template_path.rb#12 def partial; end # Returns the value of attribute partial. # # source://actionview//lib/action_view/template_path.rb#12 def partial?; end # Returns the value of attribute prefix. # # source://actionview//lib/action_view/template_path.rb#12 def prefix; end # Returns the value of attribute virtual. # # source://actionview//lib/action_view/template_path.rb#12 def to_s; end # Returns the value of attribute virtual. # # source://actionview//lib/action_view/template_path.rb#12 def to_str; end # Returns the value of attribute virtual. # # source://actionview//lib/action_view/template_path.rb#12 def virtual; end # Returns the value of attribute virtual. # # source://actionview//lib/action_view/template_path.rb#12 def virtual_path; end class << self # Convert name, prefix, and partial into a TemplatePath # # source://actionview//lib/action_view/template_path.rb#43 def build(name, prefix, partial); end # Build a TemplatePath form a virtual path # # source://actionview//lib/action_view/template_path.rb#28 def parse(virtual); end # Convert name, prefix, and partial into a virtual path string # # source://actionview//lib/action_view/template_path.rb#17 def virtual(name, prefix, partial); end end end # source://actionview//lib/action_view/renderer/template_renderer.rb#4 class ActionView::TemplateRenderer < ::ActionView::AbstractRenderer # source://actionview//lib/action_view/renderer/template_renderer.rb#5 def render(context, options); end private # Determine the template to be rendered using the given options. # # source://actionview//lib/action_view/renderer/template_renderer.rb#16 def determine_template(options); end # This is the method which actually finds the layout using details in the lookup # context object. If no layout is found, it checks if at least a layout with # the given name exists across all details before raising the error. # # source://actionview//lib/action_view/renderer/template_renderer.rb#88 def find_layout(layout, keys, formats); end # Renders the given template. A string representing the layout can be # supplied as well. # # source://actionview//lib/action_view/renderer/template_renderer.rb#58 def render_template(view, template, layout_name, locals); end # source://actionview//lib/action_view/renderer/template_renderer.rb#71 def render_with_layout(view, template, path, locals); end # source://actionview//lib/action_view/renderer/template_renderer.rb#92 def resolve_layout(layout, keys, formats); end end # = Action View Test Case # # Read more about ActionView::TestCase in {Testing Rails Applications}[https://guides.rubyonrails.org/testing.html#testing-view-partials] # in the guides. # # source://actionview//lib/action_view/test_case.rb#15 class ActionView::TestCase < ::ActiveSupport::TestCase include ::ActionDispatch::Assertions::RoutingAssertions include ::ActionDispatch::Assertions::ResponseAssertions include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess include ::Rails::Dom::Testing::Assertions::DomAssertions include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions include ::ActionDispatch::Assertions include ::AbstractController::Helpers 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 ::ActionController::TemplateAssertions include ::ActionView::Context include ::ActionDispatch::Routing::PolymorphicRoutes 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 include ::ActiveSupport::Testing::ConstantLookup include ::ActionView::RoutingUrlFor include ::ActionView::TestCase::Behavior extend ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods extend ::AbstractController::Helpers::Resolution extend ::AbstractController::Helpers::ClassMethods extend ::ActionView::Helpers::UrlHelper::ClassMethods extend ::ActionView::Helpers::SanitizeHelper::ClassMethods extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods extend ::ActionView::TestCase::Behavior::ClassMethods # 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/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 class << self # 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/test_case.rb#200 def content_class; end # source://actionview//lib/action_view/test_case.rb#200 def content_class=(value); end # source://actionview//lib/action_view/test_case.rb#200 def content_class?; 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 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__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_content_class; end # source://activesupport/8.0.1/lib/active_support/class_attribute.rb#17 def __class_attr_content_class=(new_value); end end end # source://actionview//lib/action_view/test_case.rb#45 module ActionView::TestCase::Behavior include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess include ::Rails::Dom::Testing::Assertions::DomAssertions include ::Rails::Dom::Testing::Assertions::SelectorAssertions include ::Rails::Dom::Testing::Assertions include ::ActionController::TemplateAssertions include ::ActionView::Context include ::ActionDispatch::Routing::PolymorphicRoutes include ::ActionView::ModelNaming include ::ActionView::RecordIdentifier include ::ActionView::RoutingUrlFor extend ::ActiveSupport::Concern include GeneratedInstanceMethods include ::ActionDispatch::Assertions::RoutingAssertions include ::ActionDispatch::Assertions include ::AbstractController::Helpers include ::ActionView::Helpers::UrlHelper include ::ActionView::Helpers::SanitizeHelper include ::ActionView::Helpers::TextHelper include ::ActionView::Helpers::FormTagHelper include ::ActionView::Helpers::FormHelper include ::ActionView::Helpers::TranslationHelper include ::ActionView::Helpers include ::ActiveSupport::Testing::ConstantLookup mixes_in_class_methods GeneratedClassMethods mixes_in_class_methods ::ActionDispatch::Assertions::RoutingAssertions::ClassMethods mixes_in_class_methods ::AbstractController::Helpers::ClassMethods mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods mixes_in_class_methods ::ActionView::TestCase::Behavior::ClassMethods # :method: rendered # # Returns the content rendered by the last +render+ call. # # The returned object behaves like a string but also exposes a number of methods # that allows you to parse the content string in formats registered using # .register_parser. # # By default includes the following parsers: # # +.html+ # # Parse the rendered content String into HTML. By default, this means # a Nokogiri::XML::Node. # # test "renders HTML" do # article = Article.create!(title: "Hello, world") # # render partial: "articles/article", locals: { article: article } # # assert_pattern { rendered.html.at("main h1") => { content: "Hello, world" } } # end # # To parse the rendered content into a Capybara::Simple::Node, # re-register an :html parser with a call to # Capybara.string: # # register_parser :html, -> rendered { Capybara.string(rendered) } # # test "renders HTML" do # article = Article.create!(title: "Hello, world") # # render partial: article # # rendered.html.assert_css "h1", text: "Hello, world" # end # # +.json+ # # Parse the rendered content String into JSON. By default, this means # a ActiveSupport::HashWithIndifferentAccess. # # test "renders JSON" do # article = Article.create!(title: "Hello, world") # # render formats: :json, partial: "articles/article", locals: { article: article } # # assert_pattern { rendered.json => { title: "Hello, world" } } # end # # source://actionview//lib/action_view/test_case.rb#297 def _routes; end # source://actionview//lib/action_view/test_case.rb#232 def config; end # Returns the value of attribute controller. # # source://actionview//lib/action_view/test_case.rb#63 def controller; end # Sets the attribute controller # # @param value the value to set the attribute controller to. # # source://actionview//lib/action_view/test_case.rb#63 def controller=(_arg0); end # source://actionview//lib/action_view/test_case.rb#62 def lookup_context(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute output_buffer. # # source://actionview//lib/action_view/test_case.rb#63 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/test_case.rb#63 def output_buffer=(_arg0); end # source://actionview//lib/action_view/test_case.rb#236 def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil), &block); end # Returns the value of attribute rendered. # # source://actionview//lib/action_view/test_case.rb#63 def rendered; end # Sets the attribute rendered # # @param value the value to set the attribute rendered to. # # source://actionview//lib/action_view/test_case.rb#63 def rendered=(_arg0); end # source://actionview//lib/action_view/test_case.rb#242 def rendered_views; end # Returns the value of attribute request. # # source://actionview//lib/action_view/test_case.rb#63 def request; end # Sets the attribute request # # @param value the value to set the attribute request to. # # source://actionview//lib/action_view/test_case.rb#63 def request=(_arg0); end # source://actionview//lib/action_view/test_case.rb#220 def setup_with_controller; end private # source://actionview//lib/action_view/test_case.rb#404 def _user_defined_ivars; end # The instance of ActionView::Base that is used by +render+. # # source://actionview//lib/action_view/test_case.rb#356 def _view; end # Need to experiment if this priority is the best one: rendered => output_buffer # # source://actionview//lib/action_view/test_case.rb#332 def document_root_element; end # source://actionview//lib/action_view/test_case.rb#418 def method_missing(selector, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # # source://actionview//lib/action_view/test_case.rb#434 def respond_to_missing?(name, include_private = T.unsafe(nil)); end # The instance of ActionView::Base that is used by +render+. # # source://actionview//lib/action_view/test_case.rb#356 def view; end # Returns a Hash of instance variables and their values, as defined by # the user in the test case, which are then assigned to the view being # rendered. This is generally intended for internal use and extension # frameworks. # # source://actionview//lib/action_view/test_case.rb#412 def view_assigns; end module GeneratedClassMethods def _helper_methods; end def _helper_methods=(value); end def _helper_methods?; end def content_class; end def content_class=(value); end def content_class?; end end module GeneratedInstanceMethods def _helper_methods; end def _helper_methods=(value); end def _helper_methods?; end end end # source://actionview//lib/action_view/test_case.rb#65 module ActionView::TestCase::Behavior::ClassMethods # source://actionview//lib/action_view/test_case.rb#164 def determine_default_helper_class(name); end # source://actionview//lib/action_view/test_case.rb#183 def helper_class; end # Sets the attribute helper_class # # @param value the value to set the attribute helper_class to. # # source://actionview//lib/action_view/test_case.rb#181 def helper_class=(_arg0); end # source://actionview//lib/action_view/test_case.rb#170 def helper_method(*methods); end # source://actionview//lib/action_view/test_case.rb#66 def inherited(descendant); end # source://actionview//lib/action_view/test_case.rb#187 def new(*_arg0); end # Register a callable to parse rendered content for a given template # format. # # Each registered parser will also define a +#rendered.[FORMAT]+ helper # method, where +[FORMAT]+ corresponds to the value of the # +format+ argument. # # By default, ActionView::TestCase defines parsers for: # # * +:html+ - returns an instance of +Nokogiri::XML::Node+ # * +:json+ - returns an instance of ActiveSupport::HashWithIndifferentAccess # # These pre-registered parsers also define corresponding helpers: # # * +:html+ - defines +rendered.html+ # * +:json+ - defines +rendered.json+ # # ==== Parameters # # [+format+] # The name (as a +Symbol+) of the format used to render the content. # # [+callable+] # The parser. A callable object that accepts the rendered string as # its sole argument. Alternatively, the parser can be specified as a # block. # # ==== Examples # # test "renders HTML" do # article = Article.create!(title: "Hello, world") # # render partial: "articles/article", locals: { article: article } # # assert_pattern { rendered.html.at("main h1") => { content: "Hello, world" } } # end # # test "renders JSON" do # article = Article.create!(title: "Hello, world") # # render formats: :json, partial: "articles/article", locals: { article: article } # # assert_pattern { rendered.json => { title: "Hello, world" } } # end # # To parse the rendered content into RSS, register a call to +RSS::Parser.parse+: # # register_parser :rss, -> rendered { RSS::Parser.parse(rendered) } # # test "renders RSS" do # article = Article.create!(title: "Hello, world") # # render formats: :rss, partial: article # # assert_equal "Hello, world", rendered.rss.items.last.title # end # # To parse the rendered content into a +Capybara::Simple::Node+, # re-register an +:html+ parser with a call to +Capybara.string+: # # register_parser :html, -> rendered { Capybara.string(rendered) } # # test "renders HTML" do # article = Article.create!(title: "Hello, world") # # render partial: article # # rendered.html.assert_css "h1", text: "Hello, world" # end # # source://actionview//lib/action_view/test_case.rb#148 def register_parser(format, callable = T.unsafe(nil), &block); end # source://actionview//lib/action_view/test_case.rb#155 def tests(helper_class); end private # source://actionview//lib/action_view/test_case.rb#193 def include_helper_modules!; end end # source://actionview//lib/action_view/test_case.rb#369 ActionView::TestCase::Behavior::INTERNAL_IVARS = T.let(T.unsafe(nil), Array) # source://actionview//lib/action_view/test_case.rb#336 module ActionView::TestCase::Behavior::Locals # source://actionview//lib/action_view/test_case.rb#339 def render(options = T.unsafe(nil), local_assigns = T.unsafe(nil)); end # Returns the value of attribute rendered_views. # # source://actionview//lib/action_view/test_case.rb#337 def rendered_views; end # Sets the attribute rendered_views # # @param value the value to set the attribute rendered_views to. # # source://actionview//lib/action_view/test_case.rb#337 def rendered_views=(_arg0); end end # source://actionview//lib/action_view/test_case.rb#301 class ActionView::TestCase::Behavior::RenderedViewContent < ::String # source://actionview//lib/action_view/test_case.rb#150 def html; end # source://actionview//lib/action_view/test_case.rb#150 def json; end end # Need to experiment if this priority is the best one: rendered => output_buffer # # source://actionview//lib/action_view/test_case.rb#305 class ActionView::TestCase::Behavior::RenderedViewsCollection # @return [RenderedViewsCollection] a new instance of RenderedViewsCollection # # source://actionview//lib/action_view/test_case.rb#306 def initialize; end # source://actionview//lib/action_view/test_case.rb#310 def add(view, locals); end # source://actionview//lib/action_view/test_case.rb#315 def locals_for(view); end # source://actionview//lib/action_view/test_case.rb#319 def rendered_views; end # @return [Boolean] # # source://actionview//lib/action_view/test_case.rb#323 def view_rendered?(view, expected_locals); end end # source://actionview//lib/action_view/test_case.rb#0 module ActionView::TestCase::HelperMethods # source://actionview//lib/action_view/test_case.rb#214 def _test_case; end # source://actionview//lib/action_view/test_case.rb#210 def protect_against_forgery?; end end # source://actionview//lib/action_view/test_case.rb#16 class ActionView::TestCase::TestController < ::ActionController::Base include ::ActionDispatch::TestProcess::FixtureFile include ::ActionDispatch::TestProcess # @return [TestController] a new instance of TestController # # source://actionview//lib/action_view/test_case.rb#34 def initialize; end # source://actionview//lib/action_view/test_case.rb#26 def controller_path=(path); end # Returns the value of attribute params. # # source://actionview//lib/action_view/test_case.rb#19 def params; end # Sets the attribute params # # @param value the value to set the attribute params to. # # source://actionview//lib/action_view/test_case.rb#19 def params=(_arg0); end # Returns the value of attribute request. # # source://actionview//lib/action_view/test_case.rb#19 def request; end # Sets the attribute request # # @param value the value to set the attribute request to. # # source://actionview//lib/action_view/test_case.rb#19 def request=(_arg0); end # Returns the value of attribute response. # # source://actionview//lib/action_view/test_case.rb#19 def response; end # Sets the attribute response # # @param value the value to set the attribute response to. # # source://actionview//lib/action_view/test_case.rb#19 def response=(_arg0); end private # source://actionview//lib/action_view/layouts.rb#328 def _layout(lookup_context, formats); end class << self # source://actionview//lib/action_view/test_case.rb#30 def controller_name; end # Overrides AbstractController::Base#controller_path # # source://actionview//lib/action_view/test_case.rb#23 def controller_path; end # Overrides AbstractController::Base#controller_path # # source://actionview//lib/action_view/test_case.rb#23 def controller_path=(_arg0); end private # 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 end end # source://actionview//lib/action_view/unbound_template.rb#6 class ActionView::UnboundTemplate # @return [UnboundTemplate] a new instance of UnboundTemplate # # source://actionview//lib/action_view/unbound_template.rb#10 def initialize(source, identifier, details:, virtual_path:); end # source://actionview//lib/action_view/unbound_template.rb#20 def bind_locals(locals); end # source://actionview//lib/action_view/unbound_template.rb#44 def built_templates; end # Returns the value of attribute details. # # source://actionview//lib/action_view/unbound_template.rb#7 def details; end # source://actionview//lib/action_view/unbound_template.rb#8 def format(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/unbound_template.rb#8 def handler(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/unbound_template.rb#8 def locale(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/unbound_template.rb#8 def variant(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute virtual_path. # # source://actionview//lib/action_view/unbound_template.rb#7 def virtual_path; end private # source://actionview//lib/action_view/unbound_template.rb#49 def build_template(locals); end # source://actionview//lib/action_view/unbound_template.rb#63 def normalize_locals(locals); end end # source://actionview//lib/action_view/gem_version.rb#9 module ActionView::VERSION; end # source://actionview//lib/action_view/gem_version.rb#10 ActionView::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) # source://actionview//lib/action_view/gem_version.rb#11 ActionView::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://actionview//lib/action_view/gem_version.rb#13 ActionView::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) # source://actionview//lib/action_view/gem_version.rb#15 ActionView::VERSION::STRING = T.let(T.unsafe(nil), String) # source://actionview//lib/action_view/gem_version.rb#12 ActionView::VERSION::TINY = T.let(T.unsafe(nil), Integer) # source://actionview//lib/action_view/view_paths.rb#4 module ActionView::ViewPaths extend ::ActiveSupport::Concern mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods # The prefixes used in render "foo" shortcuts. # # source://actionview//lib/action_view/view_paths.rb#81 def _prefixes; end # source://actionview//lib/action_view/view_paths.rb#11 def any_templates?(*_arg0, **_arg1, &_arg2); end # Append a path to the list of view paths for the current LookupContext. # # ==== Parameters # * path - If a String is provided, it gets converted into # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # # source://actionview//lib/action_view/view_paths.rb#103 def append_view_path(path); end # source://actionview//lib/action_view/view_paths.rb#93 def details_for_lookup; end # source://actionview//lib/action_view/view_paths.rb#11 def formats(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/view_paths.rb#11 def formats=(arg); end # source://actionview//lib/action_view/view_paths.rb#11 def locale(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/view_paths.rb#11 def locale=(arg); end # LookupContext is the object responsible for holding all # information required for looking up templates, i.e. view paths and # details. Check ActionView::LookupContext for more information. # # source://actionview//lib/action_view/view_paths.rb#88 def lookup_context; end # Prepend a path to the list of view paths for the current LookupContext. # # ==== Parameters # * path - If a String is provided, it gets converted into # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # # source://actionview//lib/action_view/view_paths.rb#113 def prepend_view_path(path); end # source://actionview//lib/action_view/view_paths.rb#11 def template_exists?(*_arg0, **_arg1, &_arg2); end # source://actionview//lib/action_view/view_paths.rb#11 def view_paths(*_arg0, **_arg1, &_arg2); end end # source://actionview//lib/action_view/view_paths.rb#14 module ActionView::ViewPaths::ClassMethods # source://actionview//lib/action_view/view_paths.rb#31 def _build_view_paths(paths); end # source://actionview//lib/action_view/view_paths.rb#23 def _prefixes; end # source://actionview//lib/action_view/view_paths.rb#15 def _view_paths; end # source://actionview//lib/action_view/view_paths.rb#19 def _view_paths=(paths); end # Append a path to the list of view paths for this controller. # # ==== Parameters # * path - If a String is provided, it gets converted into # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # # source://actionview//lib/action_view/view_paths.rb#44 def append_view_path(path); end # Prepend a path to the list of view paths for this controller. # # ==== Parameters # * path - If a String is provided, it gets converted into # the default view path. You may also provide a custom view path # (see ActionView::PathSet for more information) # # source://actionview//lib/action_view/view_paths.rb#54 def prepend_view_path(path); end # A list of all of the default view paths for this controller. # # source://actionview//lib/action_view/view_paths.rb#59 def view_paths; end # Set the view paths. # # ==== Parameters # * paths - If a PathSet is provided, use that; # otherwise, process the parameter into a PathSet. # # source://actionview//lib/action_view/view_paths.rb#68 def view_paths=(paths); end private # Override this method in your controller if you want to change paths prefixes for finding views. # Prefixes defined here will still be added to parents' ._prefixes. # # source://actionview//lib/action_view/view_paths.rb#75 def local_prefixes; end end # source://actionview//lib/action_view/template/error.rb#14 class ActionView::WrongEncodingError < ::ActionView::EncodingError # @return [WrongEncodingError] a new instance of WrongEncodingError # # source://actionview//lib/action_view/template/error.rb#15 def initialize(string, encoding); end # source://actionview//lib/action_view/template/error.rb#19 def message; end end module ERB::Escape private def html_escape(_arg0); end class << self def html_escape(_arg0); end end end