undefined method `xeditable?' error shows up
opened this issue · comments
I included this in _coment.html.erb
<%= editable [comment.article, comment], :content, url: edit_article_comment_path(comment.article, comment) %>
I also included a helper method below, which is included (helper_method :xeditable?) in the application controller. I don't use cancan authentication.
module ApplicationHelper
def xeditable?
can?(:edit, object) ? true : false
end
def can?(role, object)
true
end
end
One edit:
def xeditable?(object)
can?(:edit, object) ? true : false
end