Is it me or should this work:
<%= link_to("link", :a => {:b => 1}) %>
I expected:
?a[b]=1
But instead I get:
?a=b1
b1 is the #to_s form of {:b => 1}.
So, are my expectations wrong, or am I right ? If I'm right, where
should I look at to patch Rails ? Just a general pointer would be
appreciated.
Thanks !
--
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/
Is it me or should this work:
<%= link_to("link", :a => {:b => 1}) %>
I expected: ?a[b]=1
But instead I get: ?a=b1
2007/4/4, Mislav Marohnić <mislav....@gmail.com>:
> I tried it on edge Rails. I get what you expected:
>
> ActionController::Routing::Routes.generate({:a => {:b=>1}},
> {:controller=>'con', :action=>'act'})
> #=> "/con/act?a[b]=1"
>
> They were added in [6343]:
> http://dev.rubyonrails.org/changeset/6343
Ah, I tried merging that to the 1.2 stable branch, and the patch
applies cleanly except for CHANGELOG. Could somebody backport [6343]
to the Rails 1.2 branch ?
We took a decision early on to track 1.2 and not edge for now.
Could somebody backport [6343] to the Rails 1.2 branch ?
If it was "corrected" on trunk, I would think this is a defect that
needed correcting. Also [6343] closed three tickets, which would
imply this is something that needed work on.
Anyway, wait and see :)