-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: master
Are you sure you want to change the base?
Conversation
I tested this out on our staging servers and it's a nice improvement. Any chance of getting this merged? |
(Forgot pull requests auto-update - this includes #12 now, but I can split the controller name detection into a separate branch if preferred. ) |
I'll review and bump the version this week, probably tonight. |
@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}_/, '') |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
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.
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? |
@therabidbanana I'm using it on production, if someone has a problem, feel free to ping me. |
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. :-) |
A possible fix for #10.