jeudi 7 juillet 2016

Rails returns an empty active record and failed to initialize the attributes in side the model

I am getting an empty active record when i initialize new model object.

2.3.0 :030 > user = User.new
=> #<User > 
2.3.0 :031 >

when i access the attributes present in the model it returns an error like

2.3.0 :031 > user.UsersName
NoMethodError: undefined method `UsersName' for #<User >

Aucun commentaire:

Enregistrer un commentaire