i met an error that goes like this (even though i followed the book word for word)
but not symbol for symbol :_
ArgumentError in Login#add_user Showing app/views/login/add_user.rhtml where line #16 raised:
wrong number of arguments (0 for 1)
Extracted source (around line #16): 16: <%= form.password_field :password, :size => 40 %>
def password @password end
def password(pwd) @password = pwd create_new_salt self.hashed_password = User.encrypted_password(self.password, self.salt) end
So line 16 is trying to read the password attribute, ie it tries to call the password method. You've defined the password method as taking one argument, so it all falls over. You probably meant def password=(pwd) @password = pwd ... end
Fred