x-editable-rails gem throwing an error: undefined method `can?'
abit opened this issue · comments
This error is thrown, when using the x-editable-rails:
ActionView::Template::Error (undefined method `can?' for #<#<Class:0x007f9012e30f68>:0x007f9012ee9e78>):
14:
15: .panel-body
16: /a.doc_title.editable id='doc_title_12345' data-name="doc[title]" data-title="Enter doc title" data-type="text" data-url='/docs/12345' href='#doc_title_12345' = doc.title
17: = editable doc, :title
18:
app/views/docs/_single_doc_in_accordion.html.slim:17:in `_app_views_docs__single_doc_in_accordion_html_slim__2506304306156466629_70128411437560'
app/views/docs/index.html.slim:52:in `_app_views_docs_index_html_slim___3263534966956214695_70128384677640'
@abit - This gem requires CanCan and checks the :edit permission for the model being edited.
Is it really necessary to have CanCan as a dependency? Though the helper method is nice, can't it be handled by the user for the authorization or have it in the ReadMe as a suggested helper with CanCan. It just seems to be an unnecessary especially for users using another Authorization gem other than CanCan.
No, it's not. I just removed it, it can be handled in xeditable?
helper method