Module: HotwireDatepicker::ViewHelpers
- Defined in:
- lib/hotwire_datepicker/view_helpers.rb
Class Method Summary collapse
Instance Method Summary collapse
- #datepicker_tag(name, value = nil, **options, &block) ⇒ Object
- #hw_datepicker_style_tag(*args, **kwargs) ⇒ Object
Class Method Details
.hw_alias(method_name) ⇒ Object
8 9 10 11 12 |
# File 'lib/hotwire_datepicker/view_helpers.rb', line 8 def hw_alias(method_name) unless bypass_convenience_methods? alias_method method_name.to_s.sub(/^hw_/, ""), method_name end end |
Instance Method Details
#datepicker_tag(name, value = nil, **options, &block) ⇒ Object
15 16 17 18 19 |
# File 'lib/hotwire_datepicker/view_helpers.rb', line 15 def datepicker_tag(name, value = nil, **, &block) [:html][:class] ||= "" [:html][:class] += " datepicker" text_field_tag(name, value, , &block) end |
#hw_datepicker_style_tag(*args, **kwargs) ⇒ Object
21 22 23 |
# File 'lib/hotwire_datepicker/view_helpers.rb', line 21 def hw_datepicker_style_tag(*args, **kwargs) stylesheet_link_tag HotwireDatepicker.stylesheet_path, *args, **kwargs end |