从查询看,已经得到了正确的记录,为啥 name 显示为 group?
g2=Group.where(:name=>"Geburt")
Group Load (0.7ms) SELECT `groups`.* FROM `groups` WHERE `groups`.`name` = 'Geburt'
=> [#<Group id: 1, name: "Geburt", product_id: 1, created_at: "2013-02-21 00:48:46", updated_at: "2013-02-21 00:48:50">]
1.9.3-p385 :044 > g2
=> [#<Group id: 1, name: "Geburt", product_id: 1, created_at: "2013-02-21 00:48:46", updated_at: "2013-02-21 00:48:50">]
1.9.3-p385 :045 > g2.name
=> "Group"
group 的 name 定义。