lib/phlex/rails/helpers.rb in phlex-rails-1.1.2 vs lib/phlex/rails/helpers.rb in phlex-rails-1.2.0

- old
+ new

@@ -1,1463 +1,248 @@ # frozen_string_literal: true module Phlex::Rails::Helpers - module ActionCableMetaTag - extend Phlex::Rails::HelperMacros + autoload :ActionCableMetaTag, "phlex/rails/helpers/action_cable_meta_tag" + autoload :ActionName, "phlex/rails/helpers/action_name" + autoload :AssetPath, "phlex/rails/helpers/asset_path" + autoload :AssetURL, "phlex/rails/helpers/asset_url" + autoload :AudioPath, "phlex/rails/helpers/audio_path" + autoload :AudioTag, "phlex/rails/helpers/audio_tag" + autoload :AudioURL, "phlex/rails/helpers/audio_url" + autoload :AutoDiscoveryLinkTag, "phlex/rails/helpers/auto_discovery_link_tag" + autoload :BuildTagValues, "phlex/rails/helpers/build_tag_values" + autoload :ButtonTag, "phlex/rails/helpers/button_tag" + autoload :ButtonTo, "phlex/rails/helpers/button_to" + autoload :CSPMetaTag, "phlex/rails/helpers/csp_meta_tag" + autoload :CSRFMetaTags, "phlex/rails/helpers/csrf_meta_tags" + autoload :CheckBox, "phlex/rails/helpers/check_box" + autoload :CheckBoxTag, "phlex/rails/helpers/check_box_tag" + autoload :ClassNames, "phlex/rails/helpers/class_names" + autoload :CollectionCheckBoxes, "phlex/rails/helpers/collection_check_boxes" + autoload :CollectionRadioButtons, "phlex/rails/helpers/collection_radio_buttons" + autoload :CollectionSelect, "phlex/rails/helpers/collection_select" + autoload :ColorField, "phlex/rails/helpers/color_field" + autoload :ColorFieldTag, "phlex/rails/helpers/color_field_tag" + autoload :ComputeAssetExtname, "phlex/rails/helpers/compute_asset_extname" + autoload :ComputeAssetHost, "phlex/rails/helpers/compute_asset_host" + autoload :ComputeAssetPath, "phlex/rails/helpers/compute_asset_path" + autoload :ContentFor, "phlex/rails/helpers/content_for" + autoload :ContentTag, "phlex/rails/helpers/content_tag" + autoload :ControllerName, "phlex/rails/helpers/controller_name" + autoload :ControllerPath, "phlex/rails/helpers/controller_path" + autoload :CurrentCycle, "phlex/rails/helpers/current_cycle" + autoload :CurrentPage, "phlex/rails/helpers/current_page" + autoload :Cycle, "phlex/rails/helpers/cycle" + autoload :DOMClass, "phlex/rails/helpers/dom_class" + autoload :DOMID, "phlex/rails/helpers/dom_id" + autoload :DateField, "phlex/rails/helpers/date_field" + autoload :DateFieldTag, "phlex/rails/helpers/date_field_tag" + autoload :DateSelect, "phlex/rails/helpers/date_select" + autoload :DatetimeField, "phlex/rails/helpers/datetime_field" + autoload :DatetimeFieldTag, "phlex/rails/helpers/datetime_field_tag" + autoload :DatetimeLocalField, "phlex/rails/helpers/datetime_local_field" + autoload :DatetimeLocalFieldTag, "phlex/rails/helpers/datetime_local_field_tag" + autoload :DatetimeSelect, "phlex/rails/helpers/datetime_select" + autoload :Debug, "phlex/rails/helpers/debug" + autoload :DefaultURLOptions, "phlex/rails/helpers/default_url_options" + autoload :DistanceOfTimeInWords, "phlex/rails/helpers/distance_of_time_in_words" + autoload :DistanceOfTimeInWordsToNow, "phlex/rails/helpers/distance_of_time_in_words_to_now" + autoload :EmailField, "phlex/rails/helpers/email_field" + autoload :EmailFieldTag, "phlex/rails/helpers/email_field_tag" + autoload :ErrorMessage, "phlex/rails/helpers/error_message" + autoload :ErrorWrapping, "phlex/rails/helpers/error_wrapping" + autoload :EscapeOnce, "phlex/rails/helpers/escape_once" + autoload :Excerpt, "phlex/rails/helpers/excerpt" + autoload :FaviconLinkTag, "phlex/rails/helpers/favicon_link_tag" + autoload :FieldID, "phlex/rails/helpers/field_id" + autoload :FieldName, "phlex/rails/helpers/field_name" + autoload :FieldSetTag, "phlex/rails/helpers/field_set_tag" + autoload :Fields, "phlex/rails/helpers/fields" + autoload :FieldsFor, "phlex/rails/helpers/fields_for" + autoload :FileField, "phlex/rails/helpers/file_field" + autoload :FileFieldTag, "phlex/rails/helpers/file_field_tag" + autoload :Flash, "phlex/rails/helpers/flash" + autoload :FontPath, "phlex/rails/helpers/font_path" + autoload :FontURL, "phlex/rails/helpers/font_url" + autoload :FormFor, "phlex/rails/helpers/form_for" + autoload :FormTag, "phlex/rails/helpers/form_tag" + autoload :FormWith, "phlex/rails/helpers/form_with" + autoload :GroupedCollectionSelect, "phlex/rails/helpers/grouped_collection_select" + autoload :GroupedOptionsForSelect, "phlex/rails/helpers/grouped_options_for_select" + autoload :HiddenField, "phlex/rails/helpers/hidden_field" + autoload :HiddenFieldTag, "phlex/rails/helpers/hidden_field_tag" + autoload :Highlight, "phlex/rails/helpers/highlight" + autoload :ImagePath, "phlex/rails/helpers/image_path" + autoload :ImageSubmitTag, "phlex/rails/helpers/image_submit_tag" + autoload :ImageTag, "phlex/rails/helpers/image_tag" + autoload :ImageURL, "phlex/rails/helpers/image_url" + autoload :JavascriptImportModuleTag, "phlex/rails/helpers/javascript_import_module_tag" + autoload :JavascriptImportmapTags, "phlex/rails/helpers/javascript_importmap_tags" + autoload :JavascriptIncludeTag, "phlex/rails/helpers/javascript_include_tag" + autoload :JavascriptPath, "phlex/rails/helpers/javascript_path" + autoload :JavascriptTag, "phlex/rails/helpers/javascript_tag" + autoload :JavascriptURL, "phlex/rails/helpers/javascript_url" + autoload :L, "phlex/rails/helpers/l" + autoload :Label, "phlex/rails/helpers/label" + autoload :LabelTag, "phlex/rails/helpers/label_tag" + autoload :LinkIf, "phlex/rails/helpers/link_to_if" + autoload :LinkTo, "phlex/rails/helpers/link_to" + autoload :LinkToIf, "phlex/rails/helpers/link_to_if" + autoload :LinkToUnless, "phlex/rails/helpers/link_to_unless" + autoload :LinkToUnlessCurrent, "phlex/rails/helpers/link_to_unless_current" + autoload :Localize, "phlex/rails/helpers/localize" + autoload :MailTo, "phlex/rails/helpers/mail_to" + autoload :MonthField, "phlex/rails/helpers/month_field" + autoload :MonthFieldTag, "phlex/rails/helpers/month_field_tag" + autoload :NumberField, "phlex/rails/helpers/number_field" + autoload :NumberFieldTag, "phlex/rails/helpers/number_field_tag" + autoload :NumberToCurrency, "phlex/rails/helpers/number_to_currency" + autoload :NumberToHuman, "phlex/rails/helpers/number_to_human" + autoload :NumberToHumanSize, "phlex/rails/helpers/number_to_human_size" + autoload :NumberToPercentage, "phlex/rails/helpers/number_to_percentage" + autoload :NumberToPhone, "phlex/rails/helpers/number_to_phone" + autoload :NumberWithDelimiter, "phlex/rails/helpers/number_with_delimiter" + autoload :NumberWithPrecision, "phlex/rails/helpers/number_with_precision" + autoload :Object, "phlex/rails/helpers/object" + autoload :OptionGroupsFromCollectionForSelect, "phlex/rails/helpers/option_groups_from_collection_for_select" + autoload :OptionsForSelect, "phlex/rails/helpers/options_for_select" + autoload :OptionsFromCollectionForSelect, "phlex/rails/helpers/options_from_collection_for_select" + autoload :PasswordField, "phlex/rails/helpers/password_field" + autoload :PasswordFieldTag, "phlex/rails/helpers/password_field_tag" + autoload :PathToAsset, "phlex/rails/helpers/path_to_asset" + autoload :PathToAudio, "phlex/rails/helpers/path_to_audio" + autoload :PathToFont, "phlex/rails/helpers/path_to_font" + autoload :PathToImage, "phlex/rails/helpers/path_to_image" + autoload :PathToJavascript, "phlex/rails/helpers/path_to_javascript" + autoload :PathToStylesheet, "phlex/rails/helpers/path_to_stylesheet" + autoload :PathToVideo, "phlex/rails/helpers/path_to_video" + autoload :PhoneField, "phlex/rails/helpers/phone_field" + autoload :PhoneFieldTag, "phlex/rails/helpers/phone_field_tag" + autoload :PhoneTo, "phlex/rails/helpers/phone_to" + autoload :Pluralize, "phlex/rails/helpers/pluralize" + autoload :PreloadLinkTag, "phlex/rails/helpers/preload_link_tag" + autoload :Provide, "phlex/rails/helpers/provide" + autoload :PublicComputeAssetPath, "phlex/rails/helpers/public_compute_asset_path" + autoload :RadioButton, "phlex/rails/helpers/radio_button" + autoload :RadioButtonTag, "phlex/rails/helpers/radio_button_tag" + autoload :RangeField, "phlex/rails/helpers/range_field" + autoload :RangeFieldTag, "phlex/rails/helpers/range_field_tag" + autoload :Request, "phlex/rails/helpers/request" + autoload :ResetCycle, "phlex/rails/helpers/reset_cycle" + autoload :RichTextArea, "phlex/rails/helpers/rich_text_area" + autoload :Routes, "phlex/rails/helpers/routes" + autoload :SMSTo, "phlex/rails/helpers/sms_to" + autoload :Sanitize, "phlex/rails/helpers/sanitize" + autoload :SanitizeCSS, "phlex/rails/helpers/sanitize_css" + autoload :SearchField, "phlex/rails/helpers/search_field" + autoload :SearchFieldTag, "phlex/rails/helpers/search_field_tag" + autoload :Select, "phlex/rails/helpers/select" + autoload :SelectDate, "phlex/rails/helpers/select_date" + autoload :SelectDatetime, "phlex/rails/helpers/select_datetime" + autoload :SelectDay, "phlex/rails/helpers/select_day" + autoload :SelectHour, "phlex/rails/helpers/select_hour" + autoload :SelectMinute, "phlex/rails/helpers/select_minute" + autoload :SelectMonth, "phlex/rails/helpers/select_month" + autoload :SelectSecond, "phlex/rails/helpers/select_second" + autoload :SelectTag, "phlex/rails/helpers/select_tag" + autoload :SelectTime, "phlex/rails/helpers/select_time" + autoload :SelectYear, "phlex/rails/helpers/select_year" + autoload :SimpleFormat, "phlex/rails/helpers/simple_format" + autoload :StripLinks, "phlex/rails/helpers/strip_links" + autoload :StripTags, "phlex/rails/helpers/strip_tags" + autoload :StylesheetLinkTag, "phlex/rails/helpers/stylesheet_link_tag" + autoload :StylesheetPath, "phlex/rails/helpers/stylesheet_path" + autoload :StylesheetURL, "phlex/rails/helpers/stylesheet_url" + autoload :SubmitTag, "phlex/rails/helpers/submit_tag" + autoload :T, "phlex/rails/helpers/t" + autoload :Tag, "phlex/rails/helpers/tag" + autoload :TelephoneField, "phlex/rails/helpers/telephone_field" + autoload :TelephoneFieldTag, "phlex/rails/helpers/telephone_field_tag" + autoload :TextArea, "phlex/rails/helpers/text_area" + autoload :TextAreaTag, "phlex/rails/helpers/text_area_tag" + autoload :TextField, "phlex/rails/helpers/text_field" + autoload :TextFieldTag, "phlex/rails/helpers/text_field_tag" + autoload :TimeAgoInWords, "phlex/rails/helpers/time_ago_in_words" + autoload :TimeField, "phlex/rails/helpers/time_field" + autoload :TimeFieldTag, "phlex/rails/helpers/time_field_tag" + autoload :TimeSelect, "phlex/rails/helpers/time_select" + autoload :TimeTag, "phlex/rails/helpers/time_tag" + autoload :TimeZoneOptionsForSelect, "phlex/rails/helpers/time_zone_options_for_select" + autoload :TimeZoneSelect, "phlex/rails/helpers/time_zone_select" + autoload :TokenList, "phlex/rails/helpers/token_list" + autoload :Translate, "phlex/rails/helpers/translate" + autoload :Truncate, "phlex/rails/helpers/truncate" + autoload :TurboFrameTag, "phlex/rails/helpers/turbo_frame_tag" + autoload :TurboIncludeTags, "phlex/rails/helpers/turbo_include_tags" + autoload :TurboRefreshMethodTag, "phlex/rails/helpers/turbo_refresh_method_tag" + autoload :TurboRefreshScrollTag, "phlex/rails/helpers/turbo_refresh_scroll_tag" + autoload :TurboRefreshesWith, "phlex/rails/helpers/turbo_refreshes_with" + autoload :TurboStream, "phlex/rails/helpers/turbo_stream" + autoload :TurboStreamFrom, "phlex/rails/helpers/turbo_stream_from" + autoload :URLField, "phlex/rails/helpers/url_field" + autoload :URLFieldTag, "phlex/rails/helpers/url_field_tag" + autoload :URLFor, "phlex/rails/helpers/url_for" + autoload :URLOptions, "phlex/rails/helpers/url_options" + autoload :URLToAsset, "phlex/rails/helpers/url_to_asset" + autoload :URLToAudio, "phlex/rails/helpers/url_to_audio" + autoload :URLToFont, "phlex/rails/helpers/url_to_font" + autoload :URLToImage, "phlex/rails/helpers/url_to_image" + autoload :URLToJavascript, "phlex/rails/helpers/url_to_javascript" + autoload :URLToStylesheet, "phlex/rails/helpers/url_to_stylesheet" + autoload :URLToVideo, "phlex/rails/helpers/url_to_video" + autoload :UTF8EnforcerTag, "phlex/rails/helpers/utf8_enforcer_tag" + autoload :VideoPath, "phlex/rails/helpers/video_path" + autoload :VideoTag, "phlex/rails/helpers/video_tag" + autoload :VideoURL, "phlex/rails/helpers/video_url" + autoload :WeekField, "phlex/rails/helpers/week_field" + autoload :WeekFieldTag, "phlex/rails/helpers/week_field_tag" + autoload :WeekdayOptionsForSelect, "phlex/rails/helpers/weekday_options_for_select" + autoload :WeekdaySelect, "phlex/rails/helpers/weekday_select" + autoload :WithOutputBuffer, "phlex/rails/helpers/with_output_buffer" + autoload :WordWrap, "phlex/rails/helpers/word_wrap" - # @!method action_cable_meta_tag - # Outputs an "action-cable-url" meta tag with the value of the URL specified in your configuration. Ensure this is above your JavaScript tag: - # @see https://api.rubyonrails.org/classes/ActionCable/Helpers/ActionCableHelper.html#method-i-action_cable_meta_tag - # @return [nil] - define_output_helper :action_cable_meta_tag - end + DEPRECATED = { + Checkbox: :CheckBox, + CheckboxTag: :CheckBoxTag, + CollectionCheckboxes: :CollectionCheckBoxes, + DateTimeField: :DatetimeField, + PathToJavaScript: :PathToJavascript, + DateTimeFieldTag: :DatetimeFieldTag, + DateTimeLocalField: :DatetimeLocalField, + DateTimeLocalFieldTag: :DatetimeLocalFieldTag, + DateTimeSelect: :DatetimeSelect, + JavaScriptImportModuleTag: :JavascriptImportModuleTag, + JavaScriptImportMapTags: :JavascriptImportmapTags, + JavaScriptIncludeTag: :JavascriptIncludeTag, + JavaScriptPath: :JavascriptPath, + JavaScriptTag: :JavascriptTag, + JavaScriptURL: :JavascriptURL, + LinkIf: :LinkToIf, + PathToStyleSheet: :PathToStylesheet, + SanitizeCss: :SanitizeCSS, + SelectDateTime: :SelectDatetime, + StyleSheetLinkTag: :StylesheetLinkTag, + StyleSheetPath: :StylesheetPath, + StyleSheetURL: :StylesheetURL, + URLToJavaScript: :URLToJavascript, + URLToStyleSheet: :URLToStylesheet + } - module ActionName - extend Phlex::Rails::HelperMacros + def self.const_missing(name) + if (helper_module_name = DEPRECATED[name]) + message = "`Phlex::Rails::Helpers::#{name}` is deprecated. Please use `Phlex::Rails::Helpers::#{helper_module_name}` instead." - # @!method action_name - # @return [String] the name of the controller action, e.g. <code>"index"</code> - # @see https://api.rubyonrails.org/classes/AbstractController/Base.html#method-i-action_name - define_value_helper :action_name - end + if name.to_s.downcase == helper_module_name.to_s.downcase + message << " Note the casing of the module name has changed to match the helper method." + end - module AssetPath - extend Phlex::Rails::HelperMacros + Phlex::Rails::Deprecation.warn(message) - # @!method asset_path(source, host: nil, protocol: nil, type: nil, skip_pipeline: nil, extname: nil) - # @param source [String] - # @param host [String] - # @param protocol [String] e.g. <code>"https"</code> - # @param type [Symbol] e.g. <code>:javascript</code> - # @param skip_pipeline [bool] - # @param extname [String] e.g. <code>".js"</code> - # @see https://api.rubyonrails.org/classes/ActionView/Helpers/AssetUrlHelper.html#method-i-asset_path - define_value_helper :asset_path - end + helper_module = const_get(helper_module_name) + const_set(name, helper_module) - module AssetURL - extend Phlex::Rails::HelperMacros - - # @!method asset_url(...) - define_value_helper :asset_url - end - - module AudioPath - extend Phlex::Rails::HelperMacros - - # @!method audio_path(...) - define_value_helper :audio_path - end - - module AudioTag - extend Phlex::Rails::HelperMacros - - # @!method audio_tag(...) - # @return [nil] - define_output_helper :audio_tag - end - - module AudioURL - extend Phlex::Rails::HelperMacros - - # @!method audio_url(...) - define_value_helper :audio_url - end - - module AutoDiscoveryLinkTag - extend Phlex::Rails::HelperMacros - - # @!method auto_discovery_link_tag(...) - # @return [nil] - define_output_helper :auto_discovery_link_tag - end - - module BuildTagValues - extend Phlex::Rails::HelperMacros - - # @!method build_tag_values(...) - define_value_helper :build_tag_values - end - - module ButtonTag - extend Phlex::Rails::HelperMacros - - # @!method button_tag(...) - # @return [nil] - define_output_helper_with_capture_block :button_tag - end - - module ButtonTo - extend Phlex::Rails::HelperMacros - - # @!method button_to(...) - # @return [nil] - define_output_helper_with_capture_block :button_to - end - - module Checkbox - extend Phlex::Rails::HelperMacros - - # @!method check_box(...) - # @return [nil] - define_output_helper :check_box - end - - module CheckboxTag - extend Phlex::Rails::HelperMacros - - # @!method check_box_tag(...) - # @return [nil] - define_output_helper :check_box_tag - end - - module ClassNames - extend Phlex::Rails::HelperMacros - - # @!method class_names(...) - define_value_helper :class_names - end - - module CollectionCheckboxes - extend Phlex::Rails::HelperMacros - - # @!method collection_check_boxes(...) - # @yield [builder] - # @yieldparam builder [Phlex::Rails::BufferedCheckboxBuilder] - define_builder_yielding_helper :collection_check_boxes, Phlex::Rails::BufferedCheckboxBuilder - end - - module CollectionRadioButtons - extend Phlex::Rails::HelperMacros - - # @!method collection_radio_buttons(...) - # @yield [builder] - # @yieldparam builder [Phlex::Rails::BufferedRadioButtonBuilder] - define_builder_yielding_helper :collection_radio_buttons, Phlex::Rails::BufferedRadioButtonBuilder - end - - module CollectionSelect - extend Phlex::Rails::HelperMacros - - # @!method collection_select(...) - # @return [nil] - define_output_helper :collection_select - end - - module ColorField - extend Phlex::Rails::HelperMacros - - # @!method color_field(...) - # @return [nil] - define_output_helper :color_field - end - - module ColorFieldTag - extend Phlex::Rails::HelperMacros - - # @!method color_field_tag(...) - # @return [nil] - define_output_helper :color_field_tag - end - - module ComputeAssetExtname - extend Phlex::Rails::HelperMacros - - # @!method compute_asset_extname(...) - define_value_helper :compute_asset_extname - end - - module ComputeAssetHost - extend Phlex::Rails::HelperMacros - - # @!method compute_asset_host(...) - define_value_helper :compute_asset_host - end - - module ComputeAssetPath - extend Phlex::Rails::HelperMacros - - # @!method compute_asset_path(...) - define_value_helper :compute_asset_path - end - - module ContentFor - extend Phlex::Rails::HelperMacros - - # @!method content_for?(...) - define_value_helper :content_for? - - # @!method content_for(...) - define_value_helper_with_capture_block :content_for - end - - module ContentTag - extend Phlex::Rails::HelperMacros - - # @!method content_tag(...) - # @return [nil] - define_output_helper_with_capture_block :content_tag - end - - module ControllerName - extend Phlex::Rails::HelperMacros - - # @!method controller_name(...) - define_value_helper :controller_name - end - - module ControllerPath - extend Phlex::Rails::HelperMacros - - # @!method controller_path(...) - define_value_helper :controller_path - end - - module CSPMetaTag - extend Phlex::Rails::HelperMacros - - # @!method csp_meta_tag(...) - # @return [nil] - define_output_helper :csp_meta_tag - end - - module CSRFMetaTags - extend Phlex::Rails::HelperMacros - - # @!method csrf_meta_tags(...) - # @return [nil] - define_output_helper :csrf_meta_tags - end - - module CurrentCycle - extend Phlex::Rails::HelperMacros - - # @!method current_cycle(...) - define_value_helper :current_cycle - end - - module CurrentPage - extend Phlex::Rails::HelperMacros - - # @!method current_page?(...) - define_value_helper :current_page? - end - - module Cycle - extend Phlex::Rails::HelperMacros - - # @!method cycle(...) - define_value_helper :cycle - end - - module DateField - extend Phlex::Rails::HelperMacros - - # @!method date_field(...) - # @return [nil] - define_output_helper :date_field - end - - module DateFieldTag - extend Phlex::Rails::HelperMacros - - # @!method date_field_tag(...) - # @return [nil] - define_output_helper :date_field_tag - end - - module DateSelect - extend Phlex::Rails::HelperMacros - - # @!method date_select(...) - # @return [nil] - define_output_helper :date_select - end - - module DateTimeField - extend Phlex::Rails::HelperMacros - - # @!method datetime_field(...) - # @return [nil] - define_output_helper :datetime_field - end - - module DateTimeFieldTag - extend Phlex::Rails::HelperMacros - - # @!method datetime_field_tag(...) - # @return [nil] - define_output_helper :datetime_field_tag - end - - module DateTimeLocalField - extend Phlex::Rails::HelperMacros - - # @!method datetime_local_field(...) - # @return [nil] - define_output_helper :datetime_local_field - end - - module DateTimeLocalFieldTag - extend Phlex::Rails::HelperMacros - - # @!method datetime_local_field_tag(...) - # @return [nil] - define_output_helper :datetime_local_field_tag - end - - module DateTimeSelect - extend Phlex::Rails::HelperMacros - - # @!method datetime_select(...) - # @return [nil] - define_output_helper :datetime_select - end - - module Debug - extend Phlex::Rails::HelperMacros - - # @!method debug(...) - # @return [nil] - define_output_helper :debug - end - - module DefaultURLOptions - extend Phlex::Rails::HelperMacros - - # @!method default_url_options(...) - define_value_helper :default_url_options - end - - module DistanceOfTimeInWords - extend Phlex::Rails::HelperMacros - - # @!method distance_of_time_in_words(...) - define_value_helper :distance_of_time_in_words - end - - module DistanceOfTimeInWordsToNow - extend Phlex::Rails::HelperMacros - - # @!method distance_of_time_in_words_to_now(...) - define_value_helper :distance_of_time_in_words_to_now - end - - module DOMClass - extend Phlex::Rails::HelperMacros - - # @!method dom_class(...) - define_value_helper :dom_class - end - - module DOMID - extend Phlex::Rails::HelperMacros - - # @!method dom_id(...) - define_value_helper :dom_id - end - - module EmailField - extend Phlex::Rails::HelperMacros - - # @!method email_field(...) - # @return [nil] - define_output_helper :email_field - end - - module EmailFieldTag - extend Phlex::Rails::HelperMacros - - # @!method email_field_tag(...) - # @return [nil] - define_output_helper :email_field_tag - end - - module ErrorMessage - extend Phlex::Rails::HelperMacros - - # @!method error_message(...) - define_value_helper :error_message - end - - module ErrorWrapping - extend Phlex::Rails::HelperMacros - - # @!method error_wrapping(...) - # @return [nil] - define_output_helper :error_wrapping - end - - module EscapeOnce - extend Phlex::Rails::HelperMacros - - # @!method escape_once(...) - define_value_helper :escape_once - end - - module Excerpt - extend Phlex::Rails::HelperMacros - - # @!method excerpt(...) - define_value_helper :excerpt - end - - module FaviconLinkTag - extend Phlex::Rails::HelperMacros - - # @!method favicon_link_tag(...) - # @return [nil] - define_output_helper :favicon_link_tag - end - - module FieldID - extend Phlex::Rails::HelperMacros - - # @!method field_id(...) - define_value_helper :field_id - end - - module FieldName - extend Phlex::Rails::HelperMacros - - # @!method field_name(...) - define_value_helper :field_name - end - - module Fields - extend Phlex::Rails::HelperMacros - - # @!method fields(...) - # @yield [builder] - # @yieldparam builder [Phlex::Rails::BufferedFormBuilder] - define_builder_yielding_helper :fields, Phlex::Rails::BufferedFormBuilder - end - - module FieldSetTag - extend Phlex::Rails::HelperMacros - - # @!method field_set_tag(...) - # @return [nil] - define_output_helper_with_capture_block :field_set_tag - end - - module FieldsFor - extend Phlex::Rails::HelperMacros - - # @!method fields_for(...) - # @yield [builder] - # @yieldparam builder [Phlex::Rails::BufferedFormBuilder] - define_builder_yielding_helper :fields_for, Phlex::Rails::BufferedFormBuilder - end - - module FileField - extend Phlex::Rails::HelperMacros - - # @!method file_field(...) - # @return [nil] - define_output_helper :file_field - end - - module FileFieldTag - extend Phlex::Rails::HelperMacros - - # @!method file_field_tag(...) - # @return [nil] - define_output_helper :file_field_tag - end - - module Flash - extend Phlex::Rails::HelperMacros - - # @!method flash(...) - define_value_helper :flash - end - - module FontPath - extend Phlex::Rails::HelperMacros - - # @!method font_path(...) - define_value_helper :font_path - end - - module FontURL - extend Phlex::Rails::HelperMacros - - # @!method font_url(...) - define_value_helper :font_url - end - - module FormFor - extend Phlex::Rails::HelperMacros - - # @!method form_for(...) - # @yield [builder] - # @yieldparam builder [Phlex::Rails::BufferedFormBuilder] - define_builder_yielding_helper :form_for, Phlex::Rails::BufferedFormBuilder - end - - module FormTag - extend Phlex::Rails::HelperMacros - - # @!method form_tag(...) - # @return [nil] - define_output_helper_with_capture_block :form_tag - end - - module FormWith - extend Phlex::Rails::HelperMacros - - # @!method form_with(...) - # @yield [builder] - # @yieldparam builder [Phlex::Rails::BufferedFormBuilder] - define_builder_yielding_helper :form_with, Phlex::Rails::BufferedFormBuilder - end - - module GroupedCollectionSelect - extend Phlex::Rails::HelperMacros - - # @!method grouped_collection_select(...) - # @return [nil] - define_output_helper :grouped_collection_select - end - - module GroupedOptionsForSelect - extend Phlex::Rails::HelperMacros - - # @!method grouped_options_for_select(...) - # @return [nil] - define_output_helper :grouped_options_for_select - end - - module HiddenField - extend Phlex::Rails::HelperMacros - - # @!method hidden_field(...) - # @return [nil] - define_output_helper :hidden_field - end - - module HiddenFieldTag - extend Phlex::Rails::HelperMacros - - # @!method hidden_field_tag(...) - # @return [nil] - define_output_helper :hidden_field_tag - end - - module Highlight - extend Phlex::Rails::HelperMacros - - # @!method highlight(...) - # @return [nil] - define_output_helper :highlight - end - - module ImagePath - extend Phlex::Rails::HelperMacros - - # @!method image_path(...) - define_value_helper :image_path - end - - module ImageSubmitTag - extend Phlex::Rails::HelperMacros - - # @!method image_submit_tag(...) - # @return [nil] - define_output_helper :image_submit_tag - end - - module ImageTag - extend Phlex::Rails::HelperMacros - - # @!method image_tag(...) - # @return [nil] - define_output_helper :image_tag - end - - module ImageURL - extend Phlex::Rails::HelperMacros - - # @!method image_url(...) - define_value_helper :image_url - end - - module JavaScriptImportModuleTag - extend Phlex::Rails::HelperMacros - - # @!method javascript_import_module_tag(...) - # @return [nil] - define_output_helper :javascript_import_module_tag - end - - module JavaScriptImportMapTags - extend Phlex::Rails::HelperMacros - - # @!method javascript_importmap_tags(...) - # @return [nil] - define_output_helper :javascript_importmap_tags - end - - module JavaScriptIncludeTag - extend Phlex::Rails::HelperMacros - - # @!method javascript_include_tag(...) - # @return [nil] - define_output_helper :javascript_include_tag - end - - module JavaScriptPath - extend Phlex::Rails::HelperMacros - - # @!method javascript_path(...) - define_value_helper :javascript_path - end - - module JavaScriptTag - extend Phlex::Rails::HelperMacros - - # @!method javascript_tag(...) - # @return [nil] - define_output_helper_with_capture_block :javascript_tag - end - - module JavaScriptURL - extend Phlex::Rails::HelperMacros - - # @!method javascript_url(...) - define_value_helper :javascript_url - end - - module L - extend Phlex::Rails::HelperMacros - - # @!method l(...) - define_value_helper :l - end - - module Label - extend Phlex::Rails::HelperMacros - - # @!method label(...) - define_builder_yielding_helper :label, Phlex::Rails::BufferedLabelBuilder - end - - module LabelTag - extend Phlex::Rails::HelperMacros - - # @!method label_tag(...) - # @return [nil] - define_output_helper_with_capture_block :label_tag - end - - module LinkTo - extend Phlex::Rails::HelperMacros - - # @!method link_to(...) - # @return [nil] - define_output_helper_with_capture_block :link_to - end - - module LinkIf - extend Phlex::Rails::HelperMacros - - # @!method link_to_if(...) - # @return [nil] - define_output_helper_with_capture_block :link_to_if - end - - module LinkToUnless - extend Phlex::Rails::HelperMacros - - # @!method link_to_unless(...) - # @return [nil] - define_output_helper_with_capture_block :link_to_unless - end - - module LinkToUnlessCurrent - extend Phlex::Rails::HelperMacros - - # @!method link_to_unless_current(...) - # @return [nil] - define_output_helper_with_capture_block :link_to_unless_current - end - - module Localize - extend Phlex::Rails::HelperMacros - - # @!method localize(...) - define_value_helper :localize - end - - module MailTo - extend Phlex::Rails::HelperMacros - - # @!method mail_to(...) - # @return [nil] - define_output_helper_with_capture_block :mail_to - end - - module MonthField - extend Phlex::Rails::HelperMacros - - # @!method month_field(...) - # @return [nil] - define_output_helper :month_field - end - - module MonthFieldTag - extend Phlex::Rails::HelperMacros - - # @!method month_field_tag(...) - # @return [nil] - define_output_helper :month_field_tag - end - - module NumberField - extend Phlex::Rails::HelperMacros - - # @!method number_field(...) - # @return [nil] - define_output_helper :number_field - end - - module NumberFieldTag - extend Phlex::Rails::HelperMacros - - # @!method number_field_tag(...) - # @return [nil] - define_output_helper :number_field_tag - end - - module NumberToCurrency - extend Phlex::Rails::HelperMacros - - # @!method number_to_currency(...) - define_value_helper :number_to_currency - end - - module NumberToHuman - extend Phlex::Rails::HelperMacros - - # @!method number_to_human(...) - define_value_helper :number_to_human - end - - module NumberToHumanSize - extend Phlex::Rails::HelperMacros - - # @!method number_to_human_size(...) - define_value_helper :number_to_human_size - end - - module NumberToPercentage - extend Phlex::Rails::HelperMacros - - # @!method number_to_percentage(...) - define_value_helper :number_to_percentage - end - - module NumberToPhone - extend Phlex::Rails::HelperMacros - - # @!method number_to_phone(...) - define_value_helper :number_to_phone - end - - module NumberWithDelimiter - extend Phlex::Rails::HelperMacros - - # @!method number_with_delimiter(...) - define_value_helper :number_with_delimiter - end - - module NumberWithPrecision - extend Phlex::Rails::HelperMacros - - # @!method number_with_precision(...) - define_value_helper :number_with_precision - end - - module Object - extend Phlex::Rails::HelperMacros - - # @!method object(...) - define_value_helper :object - end - - module OptionGroupsFromCollectionForSelect - extend Phlex::Rails::HelperMacros - - # @!method option_groups_from_collection_for_select(...) - # @return [nil] - define_output_helper :option_groups_from_collection_for_select - end - - module OptionsForSelect - extend Phlex::Rails::HelperMacros - - # @!method options_for_select(...) - # @return [nil] - define_output_helper :options_for_select - end - - module OptionsFromCollectionForSelect - extend Phlex::Rails::HelperMacros - - # @!method options_from_collection_for_select(...) - # @return [nil] - define_output_helper :options_from_collection_for_select - end - - module PasswordField - extend Phlex::Rails::HelperMacros - - # @!method password_field(...) - # @return [nil] - define_output_helper :password_field - end - - module PasswordFieldTag - extend Phlex::Rails::HelperMacros - - # @!method password_field_tag(...) - # @return [nil] - define_output_helper :password_field_tag - end - - module PathToAsset - extend Phlex::Rails::HelperMacros - - # @!method path_to_asset(...) - define_value_helper :path_to_asset - end - - module PathToAudio - extend Phlex::Rails::HelperMacros - - # @!method path_to_audio(...) - define_value_helper :path_to_audio - end - - module PathToFont - extend Phlex::Rails::HelperMacros - - # @!method path_to_font(...) - define_value_helper :path_to_font - end - - module PathToImage - extend Phlex::Rails::HelperMacros - - # @!method path_to_image(...) - define_value_helper :path_to_image - end - - module PathToJavaScript - extend Phlex::Rails::HelperMacros - - # @!method path_to_javascript(...) - define_value_helper :path_to_javascript - end - - module PathToStyleSheet - extend Phlex::Rails::HelperMacros - - # @!method path_to_stylesheet(...) - define_value_helper :path_to_stylesheet - end - - module PathToVideo - extend Phlex::Rails::HelperMacros - - # @!method path_to_video(...) - define_value_helper :path_to_video - end - - module PhoneField - extend Phlex::Rails::HelperMacros - - # @!method phone_field(...) - # @return [nil] - define_output_helper :phone_field - end - - module PhoneFieldTag - extend Phlex::Rails::HelperMacros - - # @!method phone_field_tag(...) - # @return [nil] - define_output_helper :phone_field_tag - end - - module Pluralize - extend Phlex::Rails::HelperMacros - - # @!method pluralize(...) - # @return [String] - define_value_helper :pluralize - end - - module PreloadLinkTag - extend Phlex::Rails::HelperMacros - - # @!method preload_link_tag(...) - # @return [nil] - define_output_helper :preload_link_tag - end - - module PhoneTo - extend Phlex::Rails::HelperMacros - - # @!method phone_to(...) - # @return [nil] - define_output_helper_with_capture_block :phone_to - end - - module Provide - extend Phlex::Rails::HelperMacros - - # @!method provide(...) - define_value_helper_with_capture_block :provide - end - - module PublicComputeAssetPath - extend Phlex::Rails::HelperMacros - - # @!method public_compute_asset_path(...) - define_value_helper :public_compute_asset_path - end - - module RadioButton - extend Phlex::Rails::HelperMacros - - # @!method radio_button(...) - # @return [nil] - define_output_helper :radio_button - end - - module RadioButtonTag - extend Phlex::Rails::HelperMacros - - # @!method radio_button_tag(...) - # @return [nil] - define_output_helper :radio_button_tag - end - - module RangeField - extend Phlex::Rails::HelperMacros - - # @!method range_field(...) - # @return [nil] - define_output_helper :range_field - end - - module RangeFieldTag - extend Phlex::Rails::HelperMacros - - # @!method range_field_tag(...) - # @return [nil] - define_output_helper :range_field_tag - end - - module ResetCycle - extend Phlex::Rails::HelperMacros - - # @!method reset_cycle(...) - define_value_helper :reset_cycle - end - - module RichTextArea - extend Phlex::Rails::HelperMacros - - # @!method rich_text_area(...) - # @return [nil] - define_output_helper :rich_text_area - end - - module Sanitize - extend Phlex::Rails::HelperMacros - - # @!method sanitize(...) - define_value_helper :sanitize - end - - module SanitizeCss - extend Phlex::Rails::HelperMacros - - # @!method sanitize_css(...) - define_value_helper :sanitize_css - end - - module SearchField - extend Phlex::Rails::HelperMacros - - # @!method search_field(...) - # @return [nil] - define_output_helper :search_field - end - - module SearchFieldTag - extend Phlex::Rails::HelperMacros - - # @!method search_field_tag(...) - # @return [nil] - define_output_helper :search_field_tag - end - - module Select - extend Phlex::Rails::HelperMacros - - # @!method select(...) - # @return [nil] - define_output_helper :select - end - - module SelectTag - extend Phlex::Rails::HelperMacros - - # @!method select_tag(...) - # @return [nil] - define_output_helper :select_tag - end - - module SelectDate - extend Phlex::Rails::HelperMacros - - # @!method select_date(...) - # @return [nil] - define_output_helper :select_date - end - - module SelectDateTime - extend Phlex::Rails::HelperMacros - - # @!method select_datetime(...) - # @return [nil] - define_output_helper :select_datetime - end - - module SelectDay - extend Phlex::Rails::HelperMacros - - # @!method select_day(...) - # @return [nil] - define_output_helper :select_day - end - - module SelectHour - extend Phlex::Rails::HelperMacros - - # @!method select_hour(...) - # @return [nil] - define_output_helper :select_hour - end - - module SelectMinute - extend Phlex::Rails::HelperMacros - - # @!method select_minute(...) - # @return [nil] - define_output_helper :select_minute - end - - module SelectMonth - extend Phlex::Rails::HelperMacros - - # @!method select_month(...) - # @return [nil] - define_output_helper :select_month - end - - module SelectSecond - extend Phlex::Rails::HelperMacros - - # @!method select_second(...) - # @return [nil] - define_output_helper :select_second - end - - module SelectTime - extend Phlex::Rails::HelperMacros - - # @!method select_time(...) - # @return [nil] - define_output_helper :select_time - end - - module SelectYear - extend Phlex::Rails::HelperMacros - - # @!method select_year(...) - # @return [nil] - define_output_helper :select_year - end - - module SimpleFormat - extend Phlex::Rails::HelperMacros - - # @!method simple_format(...) - # @return [nil] - define_output_helper :simple_format - end - - module SMSTo - extend Phlex::Rails::HelperMacros - - # @!method sms_to(...) - # @return [nil] - define_output_helper_with_capture_block :sms_to - end - - module StripLinks - extend Phlex::Rails::HelperMacros - - # @!method strip_links(...) - define_value_helper :strip_links - end - - module StripTags - extend Phlex::Rails::HelperMacros - - # @!method strip_tags(...) - define_value_helper :strip_tags - end - - module StyleSheetLinkTag - extend Phlex::Rails::HelperMacros - - # @!method stylesheet_link_tag(...) - # @return [nil] - define_output_helper :stylesheet_link_tag - end - - module StyleSheetPath - extend Phlex::Rails::HelperMacros - - # @!method stylesheet_path(...) - define_value_helper :stylesheet_path - end - - module StyleSheetURL - extend Phlex::Rails::HelperMacros - - # @!method stylesheet_url(...) - define_value_helper :stylesheet_url - end - - module SubmitTag - extend Phlex::Rails::HelperMacros - - # @!method submit_tag(...) - # @return [nil] - define_output_helper :submit_tag - end - - module T - extend Phlex::Rails::HelperMacros - - # @!method t(...) - define_value_helper :t - end - - module TelephoneField - extend Phlex::Rails::HelperMacros - - # @!method telephone_field(...) - # @return [nil] - define_output_helper :telephone_field - end - - module TelephoneFieldTag - extend Phlex::Rails::HelperMacros - - # @!method telephone_field_tag(...) - # @return [nil] - define_output_helper :telephone_field_tag - end - - module TextArea - extend Phlex::Rails::HelperMacros - - # @!method text_area(...) - # @return [nil] - define_output_helper :text_area - end - - module TextAreaTag - extend Phlex::Rails::HelperMacros - - # @!method text_area_tag(...) - # @return [nil] - define_output_helper :text_area_tag - end - - module TextField - extend Phlex::Rails::HelperMacros - - # @!method text_field(...) - # @return [nil] - define_output_helper :text_field - end - - module TextFieldTag - extend Phlex::Rails::HelperMacros - - # @!method text_field_tag(...) - # @return [nil] - define_output_helper :text_field_tag - end - - module TimeAgoInWords - extend Phlex::Rails::HelperMacros - - # @!method time_ago_in_words(...) - define_value_helper :time_ago_in_words - end - - module TimeField - extend Phlex::Rails::HelperMacros - - # @!method time_field(...) - # @return [nil] - define_output_helper :time_field - end - - module TimeFieldTag - extend Phlex::Rails::HelperMacros - - # @!method time_field_tag(...) - # @return [nil] - define_output_helper :time_field_tag - end - - module TimeSelect - extend Phlex::Rails::HelperMacros - - # @!method time_select(...) - # @return [nil] - define_output_helper :time_select - end - - module TimeTag - extend Phlex::Rails::HelperMacros - - # @!method time_tag(...) - # @return [nil] - define_output_helper :time_tag - end - - module TimeZoneOptionsForSelect - extend Phlex::Rails::HelperMacros - - # @!method time_zone_options_for_select(...) - # @return [nil] - define_output_helper :time_zone_options_for_select - end - - module TimeZoneSelect - extend Phlex::Rails::HelperMacros - - # @!method time_zone_select(...) - # @return [nil] - define_output_helper :time_zone_select - end - - module TokenList - extend Phlex::Rails::HelperMacros - - # @!method token_list(...) - define_value_helper :token_list - end - - module Translate - extend Phlex::Rails::HelperMacros - - # @!method translate(...) - define_value_helper :translate - end - - module Truncate - extend Phlex::Rails::HelperMacros - - # @!method truncate(...) - define_value_helper :truncate - end - - module TurboFrameTag - extend Phlex::Rails::HelperMacros - - # @!method turbo_frame_tag(...) - define_output_helper_with_capture_block :turbo_frame_tag - end - - module TurboIncludeTags - extend Phlex::Rails::HelperMacros - - # @!method turbo_include_tags(...) - define_output_helper :turbo_include_tags - end - - module TurboStreamFrom - extend Phlex::Rails::HelperMacros - - # @!method turbo_stream_from(...) - define_output_helper :turbo_stream_from - end - - module URLField - extend Phlex::Rails::HelperMacros - - # @!method url_field(...) - # @return [nil] - define_output_helper :url_field - end - - module URLFieldTag - extend Phlex::Rails::HelperMacros - - # @!method url_field_tag(...) - # @return [nil] - define_output_helper :url_field_tag - end - - module URLFor - extend Phlex::Rails::HelperMacros - - # @!method url_for(...) - define_value_helper :url_for - end - - module URLOptions - extend Phlex::Rails::HelperMacros - - # @!method url_options(...) - define_value_helper :url_options - end - - module URLToAsset - extend Phlex::Rails::HelperMacros - - # @!method url_to_asset(...) - define_value_helper :url_to_asset - end - - module URLToAudio - extend Phlex::Rails::HelperMacros - - # @!method url_to_audio(...) - define_value_helper :url_to_audio - end - - module URLToFont - extend Phlex::Rails::HelperMacros - - # @!method url_to_font(...) - define_value_helper :url_to_font - end - - module URLToImage - extend Phlex::Rails::HelperMacros - - # @!method url_to_image(...) - define_value_helper :url_to_image - end - - module URLToJavaScript - extend Phlex::Rails::HelperMacros - - # @!method url_to_javascript(...) - define_value_helper :url_to_javascript - end - - module URLToStyleSheet - extend Phlex::Rails::HelperMacros - - # @!method url_to_stylesheet(...) - define_value_helper :url_to_stylesheet - end - - module URLToVideo - extend Phlex::Rails::HelperMacros - - # @!method url_to_video(...) - define_value_helper :url_to_video - end - - module UTF8EnforcerTag - extend Phlex::Rails::HelperMacros - - # @!method utf8_enforcer_tag(...) - # @return [nil] - define_output_helper :utf8_enforcer_tag - end - - module VideoPath - extend Phlex::Rails::HelperMacros - - # @!method video_path(...) - define_value_helper :video_path - end - - module VideoTag - extend Phlex::Rails::HelperMacros - - # @!method video_tag(...) - # @return [nil] - define_output_helper :video_tag - end - - module VideoURL - extend Phlex::Rails::HelperMacros - - # @!method video_url(...) - define_value_helper :video_url - end - - module WeekField - extend Phlex::Rails::HelperMacros - - # @!method week_field(...) - # @return [nil] - define_output_helper :week_field - end - - module WeekFieldTag - extend Phlex::Rails::HelperMacros - - # @!method week_field_tag(...) - # @return [nil] - define_output_helper :week_field_tag - end - - module WeekdayOptionsForSelect - extend Phlex::Rails::HelperMacros - - # @!method weekday_options_for_select(...) - # @return [nil] - define_output_helper :weekday_options_for_select - end - - module WeekdaySelect - extend Phlex::Rails::HelperMacros - - # @!method weekday_select(...) - # @return [nil] - define_output_helper :weekday_select - end - - module WithOutputBuffer - extend Phlex::Rails::HelperMacros - - # @!method with_output_buffer(...) - # @return [nil] - define_output_helper_with_capture_block :with_output_buffer - end - - module WordWrap - extend Phlex::Rails::HelperMacros - - # @!method word_wrap(...) - define_value_helper :word_wrap + helper_module + else + super + end end end