class RailheadAutoUserSweeper

Public Instance Methods

before_save(record) click to toggle source
# File lib/railhead_autouser.rb, line 29
def before_save(record)
  record.user_id = current_user.id if current_user and record.respond_to?(:user_id) and record.new_record? and record.user_id.nil?
end