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

routes upgrade not handling :controller param/hash/option #11

Open
kimptoc opened this issue Jan 21, 2011 · 1 comment
Open

routes upgrade not handling :controller param/hash/option #11

kimptoc opened this issue Jan 21, 2011 · 1 comment

Comments

@kimptoc
Copy link

kimptoc commented Jan 21, 2011

Hi,

I have probably given this the wrong title, but basically this route:

map.resource :account, :controller => "users"

Is converted to this:

resource :account

when it should be this:

resource :account, :controller => "users"

Thanks,
Chris

@phene
Copy link

phene commented Sep 26, 2011

I came across something similar. IMHO, this upgrade:routes task is more likely to do serious harm then actually help with my upgrade. My issue was the path_prefix and name_prefix being completely ignored:

map.with_options :path_prefix => 'tenant_admin', :name_prefix => 'tenant_admin_' do |tenant_admin|

    tenant_admin.resources :users, :controller => "tenant_admin/users",
      :member => {:reset_password => :get, :send_activation => :put, :deactivate => :put, :remove_profile_photo => :put, :remove_from_group => :delete},
      :only => [:index, :edit, :update]
end

That 'users' section was converted to the following at the root level:

  resources :users, :only => [:index, :edit, :update] do
    member do
      put :send_activation
      put :remove_profile_photo
      get :reset_password
      put :deactivate
      delete :remove_from_group
    end
  end

So no path or name prefixes and wrong controller.

boone referenced this issue in boone/rails_upgrade Jan 9, 2013
readme file & new configuration generator improved
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

2 participants