每当我尝试使用
Table.create :a=>"a", :b=>"b"
或者
tab=Table.new
tab.a="a"
tab.b="b"
tab.save!
生产
NoMethodError:nil 的未定义方法“名称”:NilClass
我的表模型是
class Table < ActiveRecord::Base
set_table_name "table"
set_primary_key "id"
end
每当我尝试使用
Table.create :a=>"a", :b=>"b"
或者
tab=Table.new
tab.a="a"
tab.b="b"
tab.save!
生产
NoMethodError:nil 的未定义方法“名称”:NilClass
我的表模型是
class Table < ActiveRecord::Base
set_table_name "table"
set_primary_key "id"
end