ruby on rails - Notice is Firing Twice when Saving User Model -
when save new user notice fires twice. suggestions on how fire once? using sorcery
def create @user = user.new(user_params) if @user.save redirect_to @user, notice: 'profile created.' auto_login(@user) else render :new end end
as per code snippet given above, don't think notice appear twice. there nothing wrong in code. there 1 possible chance in application
layout displaying notice defined once , in current view template it's defined again. that's why it's showing twice.
Comments
Post a Comment