added controller spec and changed before_create to before_save to allow object edition