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

Strange behavior with controllers and map #772

Closed
cj opened this Issue Jan 30, 2012 · 3 comments

Comments

Projects
None yet
4 participants
@cj

cj commented Jan 30, 2012

Padrino v. 0.10.5

So if I have:

Oauth.controllers :oauth_apps, map: '/oauth/apps' do

  get :new do
    @client = OAuth2::Model::Client.new
    haml 'oauth/apps_new'
  end

end

I run padrino rake routes It gives me (:oauth, :apps, :new) GET /oauth/apps/oauth_apps/new when I would expect to give me (:oauth, :apps, :new) GET /oauth/apps/new

Is this a bug?

Many thanks

@DAddYE

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Feb 4, 2012

Member

@cj here in your view add: <%= url(:oauth_apps, :new) %> or from consoleputs Oauth.url(:oauth_apps, :new)`. @joshbuddy any ideas?

Member

DAddYE commented Feb 4, 2012

@cj here in your view add: <%= url(:oauth_apps, :new) %> or from consoleputs Oauth.url(:oauth_apps, :new)`. @joshbuddy any ideas?

@cj

This comment has been minimized.

Show comment
Hide comment
@cj

cj Feb 4, 2012

@DAddYE that's not the issue... the url's end up all wrong..... /oauth/apps/new should exist but it doesn't... but /oauth/apps/oauth_apps/new does...

cj commented Feb 4, 2012

@DAddYE that's not the issue... the url's end up all wrong..... /oauth/apps/new should exist but it doesn't... but /oauth/apps/oauth_apps/new does...

@mmack

This comment has been minimized.

Show comment
Hide comment
@mmack

mmack Apr 26, 2012

Same problem here.

mmack commented Apr 26, 2012

Same problem here.

@nesquena nesquena closed this in b67c437 Jan 11, 2013

nesquena added a commit that referenced this issue Jan 11, 2013

Merge pull request #1001 from ujifgc/fix772
Replace named controller name in path with mapping path. Fixes #772
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment