> Click this link and bookmark the Code Search.
That's really handy. Thanks a batch.
... doug
--
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-t...@googlegroups.com.
To unsubscrib
Doug Jolley wrote:
>> irb(main):001:0> "foo".to_sym.class
>> => Symbol
>>
>> irb(main):002:0> :foo.to_s.class
>> => String
>
> VIOLA!!! That seems to be the missing link. Thanks ever so much. :)
>
> ... doug
One thing more to consider doug is learning from what you just
discovered. I
Doug Jolley wrote:
>> irb(main):001:0> "foo".to_sym.class
>> => Symbol
>>
>> irb(main):002:0> :foo.to_s.class
>> => String
>
> VIOLA!!!
Viola: string instrument that I happen to play.
Voilà: French for "there it is".
:)
> That seems to be the missing link. Thanks ever so much. :)
Great. Now
> irb(main):001:0> "foo".to_sym.class
> => Symbol
>
> irb(main):002:0> :foo.to_s.class
> => String
VIOLA!!! That seems to be the missing link. Thanks ever so much. :)
... doug
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To
$ irb
irb(main):001:0> "foo".to_sym.class
=> Symbol
irb(main):002:0> :foo.to_s.class
=> String
Jeff
On Jan 17, 4:19 pm, doug wrote:
> > I'd avoid using Net::HTTP to do anything
>
> Thanks for the input. Your point is well taken.
>
> None-the-less, I'd still like to be able to do this. The pr
> I'd avoid using Net::HTTP to do anything
Thanks for the input. Your point is well taken.
None-the-less, I'd still like to be able to do this. The problem with
my code seems to be in this line:
ordered_params[key]=params[key]
This is an assignment statement to an element of an ordered hash.
I'd avoid using Net::HTTP to do anything but the most simple of
httpclient work. You'll save a ton of time/effort by using a more
full featured httpclient to perform your POST.
There are a lot of ruby httpclient options out there. Which one to
use kind of depends on which one you like using that
> To get an array of ordered keys for the POSTed keys/vals, you could do
> something like:
>
> ...
> if request.post?
> ordered_keys = request.raw_post.split('&').collect {|k_v|
> CGI::unescape(k_v.split('=').first.to_s) }
> ...
Thanks. That worked great for parsing the raw post data (a
To get an array of ordered keys for the POSTed keys/vals, you could do
something like:
...
if request.post?
ordered_keys = request.raw_post.split('&').collect {|k_v|
CGI::unescape(k_v.split('=').first.to_s) }
...
and then use those ordered_keys in to access the params vals to
accomplish
> Try raw_post
> (http://api.rubyonrails.org/classes/ActionController/AbstractRequest.h...)
Thanks for the suggestion. What I got to work for me was
request.rawpost. That yields a string containing the post data
formatted like a get request. I can take it from here. However, my
approach would
10 matches
Mail list logo