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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -