Displaying 1 result from an estimated 1 matches for "camping_unabridg".
Did you mean:
camping_unabridged
2008 May 08
1
query strings built by R method can''t handle multiple values from checkbox selections
...lections
R(SomeRoute, :reply_status=>%w{1 2 4})
should return
query_string="
http://localhost:3301/someroute/?reply_status_id=1&reply_status_id=2&reply_status_id=4
"
qsp(query_string) -> {"reply_status_id"=>["1", "2", "4"]}
from camping_unabridged.rb
def R(c,*g)
p,h=/\(.+?\)/,g.grep(Hash)
g-=h
raise "bad route" unless u = c.urls.find{|x|
break x if x.scan(p).size == g.size &&
/^#{x}\/?$/ =~ (x=g.inject(x){|x,a|
x.sub p,C.escape((a[a.class.primary_key]rescue a))})
}...