Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8603697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:23:05+00:00 2026-06-12T02:23:05+00:00

I use devise as authentication system and I want to create the separate pages

  • 0

I use devise as authentication system and I want to create the separate pages for changing password and email address.

Should I create additional actions like update_password and update_email, or might it be better to use single update action which could accept both password and email?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T02:23:06+00:00Added an answer on June 12, 2026 at 2:23 am

    I guess that there’s no real advantage at creating new actions.
    And from what I can remember from that book you should stick to the 7 classic actions (index / show / new / edit / create / update / delete) if you can, in order to keep everything RESTFul.

    Anyway, the action would probably do the same thing.

    a classic update would be :

    def update
      user = User.find(params[:id]).update_attributes! params[:user]
    end
    

    and the eventual update_password & update_email would probably look something like that

    def update_email
      user = User.find(params[:id]).update_attributes! email: params[:user][:email]
    end
    
    def update_password
      user = User.find(params[:id]).update_attributes! password: params[:user][:password]
    end
    

    When using a single action (the update one) , the only eventual problem would be that a user could update its password via the change email form by changing the html on the page for instance.
    I don’t think that this is a problem as the user has the ability to change his password anyway.

    So I would stick to the classic update method.

    If I missed your point, please let me know 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use devise' token_authenticatable helper to authenticate users against the system. I
I use Devise in Rails 3. I want to see name of current_user in
I want to use devise's tokens to support logging in/out in multiple clients at
I'm developing Rails application and I have to use authentication. I installed devise gem
I use Devise for authentication on a model that heavily relies on caching. Because
I use Devise for authentication and I have an admin role who can manage
In my dumy rails project, I use devise to provide the login/out and authentication
I use Devise and Basic HTTP Authentication to access user areas from a mobile
I'm currently trying to use Devise 1.1.pre3 as authentication in my upcoming project, but
I want to use the device authentication as described in the documentation ( http://developers.facebook.com/docs/authentication/devices/

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.