When you start New Rails project. Always we used scaffolding for creating simple base for out application.
text_area tag in Rails – Issues
I used scaffolding for some methods. I got some very weird issue about tex_area tag in rails.
When i check the forms textagea fields are coming with 20 rows and 40 cols default. When i tried to change that is not changing even though CSS also.
<textarea id=”dummy_text” rows=”20″ name=”dummy_text” cols=”40″/>
After digging into rails code i got know that Rails ->Actionpack-> form_helper.rb file has default setting of textarea field.
def text_area(object_name, method, options = {})
InstanceTag.new(object_name, method, self, options.delete(:object)).to_text_area_tag(options)
end
We can change this also. but this is not good idea
so good idea is select our project and use find replace:
text_area to text_area_tag
This is the simplest solution.