I know it is broad question but I am really confused.
I have table users and columns :username, :pwd_hash, :first_name, :last_name etc.
When I try to create new instance with
user = User.new(:username => 'Foo', first_name => 'Bar')
puts user.inspect
and I inspect user I get that all properties set to nil. If I do get existing user all is set properly with User.find(1) so DB is setup correctly. Also there are columns with same name in DB. Using ruby 1.9.3 on Windows.
Again I know it is stupid question but I am despreate I am wondering if anybody had similiar problem. Thank you.
This can happen if your User model uses attr_protected or attr_accessible to prevent username or first_name from being mass-assigned.