在哪里可以找到此错误消息的原因?(轨道3.2.8嵌套形式)



我的新合同表单用于工作。。。它仍然需要一些改进。。。但目前的版本过去是有效的,但现在我收到了这样的消息:

3 errors prohibited this codeline from being saved:
There were problems with the following fields:
Contract can't be blank
Client can't be blank
Code can't be blank

我没有任何名为"合同"、"客户"或"代码"的字段。。。那些是我的模特。

这是我在codelines_controller:中提出的参数

{"contract_attributes"=>{"authnum"=>"900700", "st_date"=>"2012-09-03",
"end_date"=>"2012-12-31"}, "client_attributes"=>{"f_name"=>"Esme", "mi"=>"J",
"l_name"=>"Inneed", "birth_date"=>"1986-03-18", "address1"=>"62 Southy View",
"address2"=>"", "city"=>"Fromm", "zip_code"=>"55803", "state"=>"WI",
"medicare_num"=>"3008769788", "medicaid_num"=>"765894567", "member_num"=>"6709875-3",
"soc_sec_care_mgr"=>"Caring Manager", "sscm_ph"=>"1-444-444-4444",
"nurse_care_mgr"=>"Caring Nurse", "ncm_ph"=>"1-555-555-5555", "emer_contact"=>"Always
Here", "ec_ph"=>"1-666-666-6666", "pri_care_phy"=>"The One", 
"pcp_ph"=>"1-777-777-7777"}, "code_attributes"=>{"code_name"=>"S-5463",
"status"=>"Active", "description"=>"Transition from schl to work"},
"units_alloc"=>"100.00"}

因为你可以看到所有需要数据的字段都有数据,并且不是"空白">

我确实签了合同,想看看是否可以找一位专业人士帮我设计一个按钮,为表格添加额外的属性,但我不得不取消合同,因为他们没有沟通。所以这个过程的一部分要求我让他们成为github和heroku的合作者。也许他们不得不改变一些东西来进行这个项目?

有人能给我一些如何解决这个问题的指导吗?

谢谢。

查看app/models/theModelThatIsUsed.rb,如果您发现以下内容:

validates :contract, :presence => true
validates :client, :presence => true
validates :code, :presence => true

删除行

最新更新