我已經在Rails3中應用建模以下關係: class User < ActiveRecord::Base
has_and_belongs_to_many :skills
end
class SkillsUser < ActiveRecord::Base
end
class Skill < ActiveRecord::Base
has_and_belongs_to_m
所以我在這裏一些代碼,我就需要一個Rails掃地修改: class UserTrackingSweeper < ActionController::Caching::Sweeper
observe User
def after_update(user)
return if user.nil? || user.created_at.nil? #fix weird bu