In Rails you could simply build a Form based on model using “form_for” helper.

Assume your “users” table has login, password, name, email columns. Thats mapped as “User” Model using ActiveRecord (in app/models/user.rb file)

class User < ActiveRecord::Base

end

Now you could build a registration form (in views/register.rhtml file) as

<% form_for :user do |f| %>
<p> Your Name: <br />  <%= f.text_field :name %></p>
<p>  Login ID:<br /><%= f.text_field :login %></p>
<p>  Password: <br />  <%= f.text_field :password %></p>
<p>  Email:<br /> <%= f.text_field :email %></p>
<p><%= submit_tag “Create Account” %></p>
<% end %>

To complete things, write controller logic to save data (in file apps/controllers/user_controller.rb)

class UserController < ApplicationController 
     def register
         @user = User.new(params[:user])
             if(request.post? and @user.save)
                   flash[:notice] = “Account Created Successfully”
                   redirect_to :controller => ‘yourloginsuccessfullycontrollername’
             end
     end
end

Now you could access registration page at http://yourhostname/user/register