Commit eb594b730672e1f5af656578eaa9db6420a8f16a

Authored by Victor Costa
1 parent a4fefc0c

Fix expandable text area

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
app/helpers/application_helper.rb
@@ -1160,7 +1160,8 @@ module ApplicationHelper @@ -1160,7 +1160,8 @@ module ApplicationHelper
1160 end 1160 end
1161 1161
1162 def expandable_text_area(object_name, method, text_area_id, options = {}) 1162 def expandable_text_area(object_name, method, text_area_id, options = {})
1163 - text_area(object_name, method, { :id => text_area_id, :onkeyup => "grow_text_area('#{text_area_id}')" }.merge(options)) 1163 + options[:class] = (options[:class] || '') + ' autogrow'
  1164 + text_area(object_name, method, { :id => text_area_id }.merge(options))
1164 end 1165 end
1165 1166
1166 def pluralize_without_count(count, singular, plural = nil) 1167 def pluralize_without_count(count, singular, plural = nil)