From eb594b730672e1f5af656578eaa9db6420a8f16a Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Tue, 23 Dec 2014 11:35:16 -0300 Subject: [PATCH] Fix expandable text area --- app/helpers/application_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index da8e503..d07933a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1160,7 +1160,8 @@ module ApplicationHelper end def expandable_text_area(object_name, method, text_area_id, options = {}) - text_area(object_name, method, { :id => text_area_id, :onkeyup => "grow_text_area('#{text_area_id}')" }.merge(options)) + options[:class] = (options[:class] || '') + ' autogrow' + text_area(object_name, method, { :id => text_area_id }.merge(options)) end def pluralize_without_count(count, singular, plural = nil) -- libgit2 0.21.2