Module: Voncount::FormBuilderExt

Includes:
ActionView::Context, ActionView::Helpers::TagHelper
Defined in:
lib/voncount/voncount_form_helpers.rb

Instance Method Summary collapse

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, options = {})
  options[:class] = "von-countable #{options[:class]}"
   :div, class: "von-count-holder" do
    @template.send("text_area", @object_name, method, objectify_options(options)) +
    (: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, options = {})
  options[:class] = "von-countable #{options[:class]}"
   :div, class: "von-count-holder" do
    @template.send("text_field", @object_name, method, objectify_options(options)) +
    (:span, '0', class: "von-counter")
  end
end