Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested ressources don't work (Rails 3.1, Ruby 1.9.2) #29

Open
ncri opened this issue Oct 14, 2011 · 0 comments
Open

Nested ressources don't work (Rails 3.1, Ruby 1.9.2) #29

ncri opened this issue Oct 14, 2011 · 0 comments

Comments

@ncri
Copy link

ncri commented Oct 14, 2011

Given a nested route like this:

  localized do 
    resources :users do 
      resources :videos 
    end 
  end 

with a path_name translation key

locale: 
  routes: 
    users: 
      path_names: 
        new: translated_new

path_names.new is wrongly recognized as belonging to videos and the
new path segment for new_user_path is not translated.

Workaround: removing the nested resource and
adding an extra block:

localized do 
  resources :users 
end 

resources :users do 
  localized do 
    resources :videos 
  end 
end 

However, this is not very clean and I also don't know where to store
the translations for the nested videos resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant