P
P
Pavel Grudinkin2015-12-31 03:32:19
Ruby on Rails
Pavel Grudinkin, 2015-12-31 03:32:19

How to completely disable flash notice in Devise gem?

I'm trying to use devise instead of the existing self-written (as in railstutorial) authorization system. I have the following: for example, the user profile update code

def update
    if @user.update_attributes(user_params)
      flash[:success] = "Profile updated"
      redirect_to @user
    else
      render 'edit'
    end
  end

But it turns out that I see "Your account has been updated successfully." instead of "Profile updated". Devise overwrites all my flashes that it duplicates.
The question is, is it possible to completely disable Devise's flash messages and work with your own?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vsuhachev, 2015-12-31
@Hunt666

If the goal is to display a different message, then correct this message in the localization (see the devise-i18n gem)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question