[Nitro] Solved: OgAdminController#save is not the problem....

Jonathan Buch john at oxyliquit.de
Fri Nov 30 18:56:31 EST 2007


>> So, having no shame, I'll ask a stupid question:  Why Dictionary for
>> request params?   Also, does using Dictionary for some collection (
>> post/get params ) and Hash for others ( headers) risk being
>> counterintuitive?  I think it's reasonable to think of headers and
>> params as collections, and for a programmer to expect them to expose the
>> same syntax.

> Is there a reason for these to maintain order?

there _IS_ a good rason for the order:  parameter munging how I call it.
(I'm reciting from memory, bear with me).  A long time ago I created a
1000+ line test case covering the dispatcher exactly because of that

George wanted to be able to do the following:

# /foo?a=b&c=d
def foo(a, c); [a, c]; end # => ["b", "d"]

Whereas I still think even today that this is completely unnecessary,
wack, generally unclean implementation wise and leading to problems.

Without parameter munging it can be emulated this way:

def foo(a = params['a'], c = params['c']); [a, c]; end # => ["b", "d"]

But, as the story goes, George really wanted those and we finally
agreed on having it as an option, where I battled through that it
was not enabled by default, good.

Ayway, back to the Dictionary.  Hashes are unordered, leading to the
weirdest errors with parameter munging.  So, Dictionary it is until
parameter munging gets extinguished or else all hell will break loose.

Late, but anyway,


Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

More information about the Nitro-general mailing list