Editing Users With Devise and Omniauth

前端 未结 3 1861
既然无缘
既然无缘 2020-12-13 16:18

I\'m working through the Railscast on implementing Devise and OmniAuth (along with the Devise documentation) -- currently, I\'ve got a site going where visitors can sign up

3条回答
  •  太阳男子
    2020-12-13 16:32

    I saw this used somewhere.

    
    def update
        params[:user].delete(:current_password)
        params[:user].delete(:password)
        params[:user].delete(:password_confirmation)
        if current_user.update_without_password(params[:user])
          redirect_to somewhere_wicked_path, notice => "You rock"
        else
          render 'edit', :alert => 'you roll'
        end
    end
    

    use something like this in your update method in your controller. Pretty sure that method is in Devise too.

提交回复
热议问题