-
Notifications
You must be signed in to change notification settings - Fork 69
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
Won't play nice with namespaces #2
Comments
this is not the problem actually, non-namespaced controllers are not getting the method either, despite "AbstractController::Rendering.send :include, ActsAsApi::Rendering" being called |
I fixed it temporarily by explicitly adding the include into the application controller. Do you have any idea why the gem include would fail? require 'acts_as_api' |
At the moment the including of acts_as_api is a little bit quirky. The gem is broken since the Rails3 rc. So I think I will have to rework the include process, maybe by using the plugin methods of rails 3: http://edgeguides.rubyonrails.org/plugins.html#add-an-acts_as-method-to-active-record |
If this is the only way then ok, but if we can do it gem-wise, it would give users more options. |
I fixed the problem this morning. |
great! |
should work with the 0.2.1 gem version again! please note that you have to update your code, because you have to mention an api template now! |
Without any sort of API versioning, I have my controllers in a V1, V2 namespace such that the controllers are V1::FooController < ApplicationController
The render_for_api method is thus not added to the controller as it cannot find them due to the namespace. I suggest adding support for namespaces and/or api versioning.
The text was updated successfully, but these errors were encountered: