Does not trigger when ran with rails console or rake task