Hello
If you're watching the newest updates to the main repo, you'll see
that I've been quite busy :-)
I've been tweaking the code since yesterday to update everything to
run over Rails 2.2.2. My goal was to have i18n and start a
localization process. As I am from Brazil, this is important for me
and I think it would benefit people from other countries as well.
Fortunatelly the code is well covered by test, which made my job
easier. But there are still some oddities that I would like to expose
here. One is actually breaking my head right now.
Take this route:
map.resources :projects do |projects|
projects.resources :repositories, :member => { :new => :get }
end
This is a simplification of the clone page. If I load this under Rails
2.1.0 and simulate his named route:
>> new_project_repository_path(1,2)
It works properly and gives back:
=> "/projects/1/repositories/2/new"
But, if I just change the version to Rails 2.2.2 and run it again, now
I have:
>> new_project_repository_path(1,2)
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.to_sym
from /opt/ruby-enterprise-1.8.6-20081205/lib/ruby/gems/1.8/gems/
actionpack-2.2.2/lib/action_controller/routing/route.rb:243:in
`extra_keys'
from /opt/ruby-enterprise-1.8.6-20081205/lib/ruby/gems/1.8/gems/
actionpack-2.2.2/lib/action_controller/routing/route.rb:243:in `map'
from /opt/ruby-enterprise-1.8.6-20081205/lib/ruby/gems/1.8/gems/
actionpack-2.2.2/lib/action_controller/routing/route.rb:243:in
`extra_keys'
from generated code (/opt/ruby-enterprise-1.8.6-20081205/lib/ruby/
gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route.rb:
154):3:in `generate'
from /opt/ruby-enterprise-1.8.6-20081205/lib/ruby/gems/1.8/gems/
actionpack-2.2.2/lib/action_controller/routing/route_set.rb:339:in
`generate'
from /opt/ruby-enterprise-1.8.6-20081205/lib/ruby/gems/1.8/gems/
actionpack-2.2.2/lib/action_controller/url_rewriter.rb:149:in
`url_for'
from (eval):18:in `new_project_repository_path'
from (irb):2
Does anyone know what have changed in the nesting logic of 2.2.2 that
makes this break to badly?
For the time being I had to left a canonical hash with
explicit :controller, :action keys so it wouldn't blow, but it would
be nice to have it back to the named route.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Gitorious" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/gitorious?hl=en
-~----------~----~----~----~------~----~------~--~---