-
Notifications
You must be signed in to change notification settings - Fork 421
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
Admin-side Category Delete produces CategoriesController error #572
Comments
@vcavallo First thought is that jquery_ujs isn't loaded, which is typically what makes those |
@radar In the config/initializers/forem.rb file add: Rails.application.config.to_prepare do That should fix it |
Changing the links to buttons (link_to -> button_to) also works. More semantic too. |
Also has same proble, and also changed forum layout |
Approved below: Rails.application.config.to_prepare do That should fix it |
Can someone please provide me with exact details on how to reproduce this for a brand new Forem app? |
It seems that the default Forem's layout does not include jquery_ujs: https://github.com/radar/forem/blob/rails4/app/assets/javascripts/forem.js.erb Therefore when you specify own layout (eg, application) it gets loaded and everything works fine. |
I've forked forem last friday, and merged it into spree application. After, i need to render forum inside spree application. I change layout in forem.rb to spree layout. After that i tried to delete one of created forums from admin panel, and saw error described above |
@RostDetal Yeah, seems that's the case. |
my forem config/initializers/forem.rb Forem.user_class = "Spree::User" |
Hi @RostDetal and @bodrovis, I'm still waiting for some exact steps to reproduce this in a new app. Please provide these. |
@radar Don't ask me :)) I was not getting this error but judging by the details it seems that ujs is the cause. Not sure though |
|
Using:
When navigating to
/forums/admin/categories
and clicking "delete" for a category, this error is raised:The same seems to happen for any delete actions on Forums (
/forums/admin/forums
) and Groups (/forums/admin/groups
) as well.If I stick a
show.html.erb
file inapp/views/forem/admin/categories
, the delete action doesn't complain and routes to that file. But the:delete
method doesn't fire.Any ideas? I'm happy to provide any further necessary information. See below for full stack trace, gemfile and gemfile.lock
full stack trace:
Gemfile: https://gist.github.com/vcavallo/8681c1fac0adac0a82df
Gemfile.lock: https://gist.github.com/vcavallo/c5802edf54b563dff350
The text was updated successfully, but these errors were encountered: