I am newbie to ruby as my question reveals. Can anybody help me, please, how to acces id when i get something like "employee"=>{"id"=>"101"} in request, thanxs a lot. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You should read up on hashes. You most likely want: params[:employee][:id] Mike On 3/4/08, thriller <Martin.Choma-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I am newbie to ruby as my question reveals. Can anybody help me, > please, how to acces id when i get something like > "employee"=>{"id"=>"101"} in request, thanxs a lot. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
thriller wrote:> I am newbie to ruby as my question reveals. Can anybody help me, > please, how to acces id when i get something like > "employee"=>{"id"=>"101"} in request, thanxs a lot. > > > >Try params[:employee] and params[:employee][:id] -- http://www.5valleys.com/ http://www.workingwithrails.com/person/8078 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 3/4/08, thriller <Martin.Choma-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I am newbie to ruby as my question reveals. Can anybody help me, > please, how to acces id when i get something like > "employee"=>{"id"=>"101"} in request, thanxs a lot.params[:employee][:id] -- Greg Donald http://destiney.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 -~----------~----~----~----~------~----~------~--~---
Your description makes no sense. But I''ll give it a shot. If you have an array of parameters called employee, you can access the id attribute more like params[:employee][:id] On Mar 4, 3:33 pm, thriller <Martin.Ch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am newbie to ruby as my question reveals. Can anybody help me, > please, how to acces id when i get something like > "employee"=>{"id"=>"101"} in request, thanxs a lot.--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---