How to call helper method from model?
问题 I use MongoDB as database in my Rails application with MongoID gem. I want to call helper method from model with n aafter_create callback method. How is it possible? My model code is: class Department include ApplicationHelper after_create :create_news private def create_news @user = ApplicationHelper.get_current_users end end And my helper code is: module ApplicationHelper def get_current_users current_user end end When I create new department then following error occur. undefined method