Module: Voncount::FormBuilderExt
- Includes:
- ActionView::Context, ActionView::Helpers::TagHelper
- Defined in:
- lib/voncount/voncount_form_helpers.rb
Instance Method Summary collapse
- #voncount_text_area(method, options = {}) ⇒ Object
- #voncount_text_field(method, options = {}) ⇒ Object
Instance Method Details
#voncount_text_area(method, options = {}) ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/voncount/voncount_form_helpers.rb', line 59 def voncount_text_area(method, = {}) [:class] = "von-countable #{[:class]}" content_tag :div, class: "von-count-holder" do @template.send("text_area", @object_name, method, ()) + content_tag(:span, '0', class: "von-counter") end end |
#voncount_text_field(method, options = {}) ⇒ Object
51 52 53 54 55 56 57 |
# File 'lib/voncount/voncount_form_helpers.rb', line 51 def voncount_text_field(method, = {}) [:class] = "von-countable #{[:class]}" content_tag :div, class: "von-count-holder" do @template.send("text_field", @object_name, method, ()) + content_tag(:span, '0', class: "von-counter") end end |