feng
1
hi all,
i have a text_area
<%= text_area :myarea, :rows => 20, :cols => 40 %>
and want to get it’s content when submit due to form_remote_tag.
how can i get it’s content where user input ?
i tried
@context = params[:myarea]
and
@context = params[:myarea][:value]
and
@context = params[:myarea][:body]
and others, but just can’t work
any tips is appreciated.
thanks
feng
2
I found if I change my code in view to :
<%= text_area :myarea, :body :rows => 20, :cols => 40 %>
and in controller:
@context = params[:myarea][:body]
then i can access it.
But I still don’t know why … ?
feng
3
feng wrote:
I found if I change my code in view to :
<%= text_area :myarea, :body :rows => 20, :cols => 40 %>
and in controller:
@context = params[:myarea][:body]
then i can access it.
But I still don’t know why … ?
try text_area_tag instead of text_area
feng
4
Gokhan A. wrote:
feng wrote:
I found if I change my code in view to :
<%= text_area :myarea, :body :rows => 20, :cols => 40 %>
and in controller:
@context = params[:myarea][:body]
then i can access it.
But I still don’t know why … ?
try text_area_tag instead of text_area
i tried text_area_tag and found it is really great !
thanks very much !