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

Controller and Action detection #11

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

therabidbanana
Copy link

A possible fix for #10.

@crossman
Copy link

crossman commented Dec 7, 2012

I tested this out on our staging servers and it's a nice improvement. Any chance of getting this merged?

@therabidbanana
Copy link
Author

(Forgot pull requests auto-update - this includes #12 now, but I can split the controller name detection into a separate branch if preferred. )

@Xylakant
Copy link
Member

I'll review and bump the version this week, probably tonight.

@crossman
Copy link

@Xylakant any progress?

params = found_route.first.params
found_route = found_route.first.path.route
controller = found_route.controller.to_s
short_name = found_route.named.to_s.gsub(/^#{controller}_/, '')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to use this, does it actually works for you? shouldn't it be found_route.name ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, there must be something going on with the version, named was not longer an attr_reader after joshbuddy/http_router@6c7285f#L7L3

abuiles and others added 5 commits April 19, 2013 00:01
The attr_reader named was not longer available after the following commit:
   joshbuddy/http_router@6c7285f#L7L3

This changes were probably done against an older version of
http_router.

Also based on
padrino/padrino-framework@587ff7, it seems
like the route has an array of arrays in the first element, handle
that case too.
When requesting an asset compiled_router.recognize returns nil in
the first element

 => found_route = self.class.compiled_router.recognize(request.env)
 => [nil, #<Set: {"GET", "HEAD"}>]
Fix issues with http_router.
@therabidbanana
Copy link
Author

Merged in the latest fixes regarding http_router from @abuiles, but I don't use padrino with New Relic any more so I'm just hoping it works. Anyone still actively using this care to confirm?

@abuiles
Copy link

abuiles commented Apr 23, 2013

@therabidbanana I'm using it on production, if someone has a problem, feel free to ping me.

@lsdr
Copy link

lsdr commented May 6, 2013

Using the @therabidbanana branch in personal projects and in test environments at work and it is all fine. Not yet in production, we don't use gems pulled from Github for production systems.

Which means I'm anxious to see thoses patches merged upstream and a new version of the gem released. :-)

@abuiles
Copy link

abuiles commented May 6, 2013

@lsdr I've been working nicely for my branch in production, but I guess @Asquera is the man we depend on now :)

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

Successfully merging this pull request may close these issues.

5 participants