Hi tamouse, thank you your replay.
I close the hash but the erro continues, see: *My code:* reponse = RestClient.post( 'https://mandrillapp.com/api/1.0/messages/send.json', {:key => "XXXXXXXXXXXXXXXXX", :message => { :html => 'testeeeee', :text => 'Example text content', :subject => 'example subject', :from_email => 'te...@handcom.com.br', :from_name => 'Pedreco', :to => [{:email => 'te...@handcom.com.br'}] } }) *the error:* {"status":"error","code":-2,"name":"ValidationError","message":"Validation error: {\"message\":{\"to\":[\"Please enter an array\"]}}"} I'm using the Mandrill API. Thank's!!! On Wednesday, December 4, 2013 10:14:12 PM UTC-2, tamouse wrote: > > > > > On Wed, Dec 4, 2013 at 2:14 PM, <mar...@handcom.com.br <javascript:>>wrote: > >> Hello, >> >> in my code, the array param does not work. >> >> reponse = RestClient.post( >> 'https://mandrillapp.com/api/1.0/messages/send.json', >> {:key => "XXXXXXXXXXXXXXXXX", >> :message => { >> :html => ' >> >> testeeeee >> ', >> :text => 'Example text content', >> :subject => 'example subject', >> :from_email => 'te...@handcom.com.br <javascript:>', >> :from_name => 'Pedreco', >> :to => [ >> {:email => 'te...@handcom.com.br <javascript:>' >> > > Right here you forgot to close the hash. > >> >> ] >> } >> }) >> >> But if a remove this code: ":to => [{:email => >> 'te...@handcom.com.br<javascript:> >> ']" >> >> the code work. >> >> Could you help me? >> >> Thanks!! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to rubyonrails-ta...@googlegroups.com <javascript:>. >> To post to this group, send email to >> rubyonra...@googlegroups.com<javascript:> >> . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rubyonrails-talk/8adfa5f5-eaa5-4f2a-9a91-51ea20c4715c%40googlegroups.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/907de359-92da-49ea-8b24-eb2dbb14173b%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.