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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:51:00+00:00 2026-06-18T08:51:00+00:00

i have a problem with a form to create a user… this is my

  • 0

i have a problem with a form to create a user… this is my code of “new”

<%= form_for @user do |f| %>
  <% if @user.errors.any? %>
    <% for message in @user.errors.full_messages %>
    <div class="alert">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <%= message %>
    </div>
    <% end %>
 <% end %>
  <div class="field">
    <%= f.label :username %>
    <%= f.text_field :username %>
  </div>
  <div class="field">
    <%= f.label :email %>
    <%= f.text_field :email %>
  </div>
  <div class="field">
    <%= f.label :password %>
    <%= f.password_field :password %>
  </div>
  <div class="field">
    <%= f.label :password_confirmation %>
    <%= f.password_field :password_confirmation %>
  </div>
  <div class="actions"><%= f.submit "Registrarse" %></div>
<% end %>

and “create” in controller

def create
   @user = User.new(params[user])
    if @user.save
      redirect_back_or_to root_url, :notice => "Usuario Registrado Satisfactoriamente!"
    else
      render :new, :notice => "No se ha podido registrar"
    end
end

when i create the user, this go to login form, and a receive a message empty, because i have an “if” if i have message, this show me a div with some css, so i can see that an error ocurred, but this come empty, what i have wrong? i dont see anything… and of course, the user is not created.!
thanks for the help, i am a newbie in ruby. and sorry for my bad english xd

  • 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-18T08:51:01+00:00Added an answer on June 18, 2026 at 8:51 am

    The problem is that you most likely are referencing password_confirmation which is usually an input tag. You most likely do not have this field in your database as it would just be horrible practice. Are you salting your passwords?

    Check out sorcery on github and the Railscasts. It does a nice job on covering authentication.

    Also, you need to use :user in the params => User.new(params[:user])

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

Sidebar

Related Questions

Let's say we have an edit form to create a new user. Now the
I've created a form with code and I have a big problem. Every element
i have a problem. This is how im trying to extend default User model:
I have this problem: My web application has a form where the users can
I have a problem with my application's model. it should save a new user
I have a problem with the Form Helper that returned $this->data keeps being empty.
I have this code. My problem is none of the style is getting applied
Right now I have an asp:Wizard with 3 Steps. Create User Form to Email
I have a problem that has been driving me nuts. I create a Form
i have problem in login form $this->Auth->login() always returns false. i am using different

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.