lib/phlex/rails/helpers.rb in phlex-rails-1.2.2 vs lib/phlex/rails/helpers.rb in phlex-rails-2.0.0.beta1
- old
+ new
@@ -10,12 +10,10 @@
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"
@@ -27,15 +25,15 @@
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 :CSPMetaTag, "phlex/rails/helpers/csp_meta_tag"
+ autoload :CSRFMetaTags, "phlex/rails/helpers/csrf_meta_tags"
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"
@@ -44,21 +42,23 @@
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 :DOMClass, "phlex/rails/helpers/dom_class"
+ autoload :DOMID, "phlex/rails/helpers/dom_id"
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 :FieldSetTag, "phlex/rails/helpers/field_set_tag"
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"
@@ -73,12 +73,12 @@
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 :JavascriptImportModuleTag, "phlex/rails/helpers/javascript_import_module_tag"
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"
@@ -91,10 +91,11 @@
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 :Notice, "phlex/rails/helpers/notice"
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"
@@ -128,11 +129,10 @@
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"
@@ -145,10 +145,11 @@
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 :SMSTo, "phlex/rails/helpers/sms_to"
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"
@@ -171,13 +172,13 @@
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 :TurboRefreshesWith, "phlex/rails/helpers/turbo_refreshes_with"
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"
@@ -191,58 +192,12 @@
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 :WeekField, "phlex/rails/helpers/week_field"
+ autoload :WeekFieldTag, "phlex/rails/helpers/week_field_tag"
autoload :WithOutputBuffer, "phlex/rails/helpers/with_output_buffer"
autoload :WordWrap, "phlex/rails/helpers/word_wrap"
-
- 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,
- }
-
- 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."
-
- 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
-
- Phlex::Rails::Deprecation.warn(message)
-
- helper_module = const_get(helper_module_name)
- const_set(name, helper_module)
-
- helper_module
- else
- super
- end
- end
end