0
after_touch如何?回调工作? Rails 2.3.x支持它吗?Rails AR回调 - :after_touch?
after_touch如何?回调工作? Rails 2.3.x支持它吗?Rails AR回调 - :after_touch?
触摸在rails 2.3.x中受支持:请参阅this answer 我不确定after_touch在3.0.0之前是否受支持,因为我相信它是“after”方法的一部分。 http://apidock.com/rails/ActiveRecord/Callbacks/touch
in Active record callback
after_touch do |user|
puts "You have touched an object"
end
end
据我的理解这个意思,如果定义
,当曾经我们希望与一些对象,然后做触摸后会被调用