Module: Voncount::FormHelperExt
- Defined in:
- lib/voncount/voncount_form_helpers.rb
Instance Method Summary collapse
- #voncount_text_area(object_name, method, options = {}) ⇒ Object
- #voncount_text_field(object_name, method, options = {}) ⇒ Object
Instance Method Details
#voncount_text_area(object_name, method, options = {}) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/voncount/voncount_form_helpers.rb', line 39 def voncount_text_area(object_name, method, = {}) [:class] = "von-countable #{[:class]}" content_tag :div, class: "von-count-holder" do ActionView::Helpers::Tags::TextArea.new(object_name, method, self, ).render + content_tag(:span, '0', class: "von-counter") end end |
#voncount_text_field(object_name, method, options = {}) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/voncount/voncount_form_helpers.rb', line 31 def voncount_text_field(object_name, method, = {}) [:class] = "von-countable #{[:class]}" content_tag :div, class: "von-count-holder" do ActionView::Helpers::Tags::TextField.new(object_name, method, self, ).render + content_tag(:span, '0', class: "von-counter") end end |