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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 ... ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Gokhan Arli 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_areai tried text_area_tag and found it is really great ! thanks very much ! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---