Rails Allows Programmer to create active record object using following
Ways
1)user=User.new(:name => "David", :occupation => "Code Artist")
2)
user = User.new do |u| u.name = "David" u.occupation = "Code Artist" end
3)user = User.new user.name = "David" user.occupation = "Code Artist"
No comments:
Post a Comment