Character count a textarea in Ruby on Rails
I used to do this with an 'onkeyup' attribute, but that's not available to the 'observe_field' method. But, by setting the frequency to a tenth of a second, it's much better. The character count updates even on keydown and hold.In the view you just do this Message ( characters)
<%= text_area_tag :description %> <%= character_count('description','char_count'


Recent comments
1 year 23 weeks ago
1 year 23 weeks ago
1 year 25 weeks ago
1 year 27 weeks ago
1 year 42 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 46 weeks ago
1 year 48 weeks ago