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

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

c++ - In an add-in in Excel, written in C(++), how does one get the name of the function which called into the addin? -