DummyModule included do #I would like to use current_userand cookies here without initialising the class with any arguments!endend 我知道可以用类DummyClass.new(current_user, cookies)之外的
我有两个控制器,即carts_controller 2) orders_controller helper_methodmethod1 end
# using method1 and method2end
注意:method3使用的是method1和method2。CartsController有showcart.html.e
我使用的是Devise和Rails 3.2.16。我想自动插入谁创建了一个记录,谁更新了一个记录。所以我在模特身上有这样的东西:before_update :insert_updated_by
def insert_created_byinsert_updated_byend
问题是我得到了错误undefined local variable or metho