Hunt Hunt wrote:

> 
> <h3>Login</h3>
> <%= form_tag :action => "login" %>
>    Login: <%= text_field "users", "name", :size => 20 %><br />
>    Password: <%= password_field "users", "hashed_password",:size =>
> 20%><br />
>    <%= submit_tag "Submit" %>
> 
>   <%= link_to 'Register', :action => 'signup' %>
>     <%= link_to 'Forgot my password', :action => 'forgot_password' %>
> 
> 
> My table with name users in db has following attributes.
> 
> 
> 
> users
> --------------------------------------------
> user | hased_password | email | created_at |

Hunt,
first thing, hashed_password is spelled incorrectly in your db..

As you currently have it stated in your form, the way to retrieve it 
within your controller would be

user_params = params[:user]

def hash_algorithim(password) {
#hash your password here
}

user = User.new(:user => user_params[:name], :hashed_password => 
hash_algorithim(user_params[:hashed_password]))

hth
ilan
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to