changed generate_slug to run 'before_save'