-
Notifications
You must be signed in to change notification settings - Fork 335
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
ActiveAdmin/Rabl::Engine conflict #112
Comments
Wow that core extension is fairly insane. They overwrite to_html on every single class? |
Completely insane. I think I'll create a ticket in their project as well. |
It's already been reported in ActiveAdmin and someone has a pull request in. See activeadmin/activeadmin#496 |
Glad to see someone has a sane pull request. Hilarious that it only requires changing two method calls and the monkeypatch becomes totally unnecessary. |
It seems like this issue is not an issue with RABL and can be closed then, no/ |
Yep, agreed. Closing, hopefully that will be pulled in soon. |
There's a conflict with
Rabl::Engine.request_format
whenActiveAdmin
is installed.The offending line in ActiveAdmin (https://github.com/gregbell/active_admin/blob/master/lib/active_admin/arbre/core_extensions.rb) causes the rabl engine to think it can respond to
to_html
, except that it just callsto_s
, which returns"#<Rabl::Engine:0x007fa36b0de178>"
. This is really only an issue when you don't specify a request format.An example output from my failing rspec:
I'm not sure how you want to proceed, but I thought you should be aware of this conflict.
For reference, my solution was to call
Object.send :remove_method, :to_html
in myspec_helper.rb
The text was updated successfully, but these errors were encountered: