Module: RightRails::Helpers::Forms::InstanceTagMethods
- Defined in:
- lib/right_rails/helpers/forms.rb
Instance Method Summary collapse
- #to_autocomplete_field_tag(options) ⇒ Object
- #to_calendar_field_tag(options) ⇒ Object
- #to_colorpicker_field_tag(options) ⇒ Object
- #to_rater_tag(options) ⇒ Object
- #to_rte_field_tag(options) ⇒ Object
- #to_slider_tag(options) ⇒ Object
- #to_tags_field_tag(options) ⇒ Object
Instance Method Details
#to_autocomplete_field_tag(options) ⇒ Object
325 326 327 |
# File 'lib/right_rails/helpers/forms.rb', line 325 def to_autocomplete_field_tag() to_input_field_tag('text', ) end |
#to_calendar_field_tag(options) ⇒ Object
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/right_rails/helpers/forms.rb', line 309 def to_calendar_field_tag() = .stringify_keys # formatting the date/time value if the format is specified = (["data-calendar-options"] || ["data-calendar"]) if !["value"] && format = .scan(/format:('|")(.+?)\1/) time = value_before_type_cast(object) if time && time.respond_to?(:to_time) && format.size == 1 ["value"] = time.to_time.strftime(format[0][1]) end end to_input_field_tag('text', ) end |
#to_colorpicker_field_tag(options) ⇒ Object
337 338 339 |
# File 'lib/right_rails/helpers/forms.rb', line 337 def to_colorpicker_field_tag() to_input_field_tag('text', ) end |
#to_rater_tag(options) ⇒ Object
333 334 335 |
# File 'lib/right_rails/helpers/forms.rb', line 333 def to_rater_tag() to_input_field_tag('hidden', ) end |
#to_rte_field_tag(options) ⇒ Object
345 346 347 |
# File 'lib/right_rails/helpers/forms.rb', line 345 def to_rte_field_tag() to_text_area_tag() end |
#to_slider_tag(options) ⇒ Object
329 330 331 |
# File 'lib/right_rails/helpers/forms.rb', line 329 def () to_input_field_tag('hidden', ) end |
#to_tags_field_tag(options) ⇒ Object
341 342 343 |
# File 'lib/right_rails/helpers/forms.rb', line 341 def () to_input_field_tag('text', ) end |