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 8555847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:13:02+00:00 2026-06-11T15:13:02+00:00

I am following https://github.com/plataformatec/devise_example.git which really is so good but i need to do

  • 0

I am following https://github.com/plataformatec/devise_example.git which really is so good but i need to do some additions to it and do not know how to do.

I want to create an api for iphone app and the initial process is create new user by signup and then the account has to be confirmed in mail, and once confirmed the user can login and view his details like name, email, password, language, country, etc… But in this example, after logging in we can view the account info but the password field is left empty and then there are only two fields email and password. Also i want to know whether this devise example can be used as api and please tell me how to add the rest of the fields like language, country and similar things to the user account information. And if this is not possible, then how can i do all these things.Please help me. Also tell me if there is any example.

  • 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-11T15:13:03+00:00Added an answer on June 11, 2026 at 3:13 pm

    The user model you create with devise is in many ways just like other models, so you can modify it with a migration. In your console, at the rails application root:

    rails g migration AddCountryAndLanguageAndNameAndEmailToUsers country:string language:string name:string email:string
    rake db:migrate
    

    You of course have to modify your views (and probably the attr_accessible line in your model) to add these fields.

    Devise doesn’t store the users’ passwords; instead, it stores a hash of the password. Storing a user’s password directly is generally considered a bad practice. However, if you’re dead set on it, there’s no reason you can’t modify the above migration to include a plain text password column.

    Using as JSON:

    Rabl is a great gem for JSON templates.

    Otherwise, in your Users Controller:

    class UsersController
      def show
        @user = User.find params[:id]
        respond_to do |format|
          format.html
          format.json { render json: @user }
        end
      end
    
      def index
        @users = User.all
        respond_to do |format|
          format.html
          format.json { render json: @users }
        end
      end
    end
    

    And so forth…

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

Sidebar

Related Questions

I've found the following code: https://github.com/roddi/ValidateStoreReceipt/blob/master/validatereceipt.m which loads the root certificate ('Apple Root CA')
I'm trying to build sbt 0.12.0-RC1 following instructions at https://github.com/harrah/xsbt to the letter, but
Following is the Play 2 app, https://github.com/playframework/Play20/tree/master/samples/java/forms Which portrays Dynamic form binding where form
Accordng to https://github.com/reddit/reddit/wiki/API I need to: Post the following to http://www.reddit.com/api/submit : uh=f0f0f0f0&kind=link&url=yourlink.com&sr=funny &title=omg-look-at-this&id%23newlink&r=funny&renderstyle=html
After following: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview I can sign up a user via Facebook. But I'm struggling
I'm working to the following little project: https://github.com/AndreaCrotti/project-organizer Which in short aims to manage
I've been following the tutorial on the Devise github page here: https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign_in-using-their-username-or-email-address I'm in
Rails 3.0 Following these instructions: https://github.com/plataformatec/devise/wiki/How-To%3a-Require-admin-to-activate-account-before-sign_in I've generated a migration :approved (boolean) for my
I'm following this tutorial: https://github.com/plataformatec/devise/wiki/OmniAuth%3A-Overview My configs are: Gemfile: gem 'devise', '1.5' gem 'omniauth-facebook'
Am using the following https://github.com/apache/incubator-cordova-mac to make mac os x apps, but It seems

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.