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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:33:22+00:00 2026-05-29T10:33:22+00:00

Basically my sign up form is not working. When I sign someone up it

  • 0

Basically my sign up form is not working. When I sign someone up it states that the user exists

(0.1ms)  begin transaction 
User Exists (0.2ms)  SELECT 1 FROM "users" WHERE LOWER("users"."email") == LOWER('sambam@herpderp.edu') LIMIT 1
(0.1ms)  rollback transaction

I am unsure what the issue is. Here are some of my model code and controller code.

User Model

class User < ActiveRecord::Base
attr_accessible :name, :email, :password, :password_confirmation, :biography, :avatar
has_secure_password
before_create { generate_token(:auth_token) }
validates :name, presence: true, length: { maximum: 20 }
valid_email_regex = /\A[\w+\-.]+@[a-z\d\-.]+\.edu/i
validates :email, presence:   true,
                  format:     { with: valid_email_regex },
                  uniqueness: { case_sensitive: false }
validates :password, length: { minimum: 6}, :on => :create   
validates :password_digest, presence: { message: "Password can't be blank" }
validates :biography, presence: true, length: { maximum: 140 }
has_attached_file :avatar, :styles => { :small => "75x75>" }
end

User Controller

class UsersController < ApplicationController

def new
  @user = User.new
end

def show
  @user = User.find(params[:id])
end

def create
  @user = User.new(params[:user])
  if @user.save
    redirect_to @user
  else
    redirect_to current_school
  end
end

School Model

class School < ActiveRecord::Base
  attr_accessible :name
end

School Controller

class SchoolsController < ApplicationController

def create
 school = School.find(params[:name])
 if school
   session[:school_id] = school.id
   redirect_to school_path(school)
 end
end

def show
  @school = School.find(params[:id])
  @user =User.new
end

end

Sign Up Form

<%= form_for @user do |f| %>
<%= f.text_field :name, :class => 'modal_signinfield', :placeholder => 'Name'  %>
</br></br>
<%= f.text_field :email, :class => 'modal_signinfield', :placeholder => 'Email: Must be .edu'  %>
</br></br>
<%= f.password_field :password, :class => 'modal_signinfield', :placeholder => 'Password: Must be at least 6 letters'  %>
</br></br>
<%= f.password_field :password_confirmation, :class => 'modal_signinfield', :placeholder => 'Renter Password'  %>
<%= f.submit "Sign Up", :class => 'sign_up_button'%>
<% end %>
  • 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-05-29T10:33:23+00:00Added an answer on May 29, 2026 at 10:33 am

    Because you log is showing rollback, it can be assumed that something went wrong with a callback or in your case the User model validation.

    Looks like you have a validation that is required, which you are not entering in your signup form.

    validates :biography, presence: true, length: { maximum: 140 }
    

    Either make this conditional for a new_record? or remove it.

    Might be worth showing the errors in the form, so you will see what validation errors occurred.

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

Sidebar

Related Questions

So I am creating a website that basically allows user to sign up using
I have a HTML form, which includes radio buttons that the user can select
I have a simple web form that feeds into Infusionsoft. Not my call. I
I have the requirement that the end user should not be able to go
Basically I’ve heard that certain conditions will cause .NET to blow past the finally
Basically I'm trying to accomplish the same thing that mailto:bgates@microsoft.com does in Internet Explorer
Just was wondering how to go about requesting a user to sign up to
I have a coming_soon_controller that displays a form for users to subscribe to an
I'm trying to setup a registration form for some workshops that last a week.
Not quite programming, but someone here will know what I'm talking about and didn't

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.