阅读背景:

Object string is printing to HTML stream in Rails 4.1

来源:互联网 

I have a couple of simple polymorphic relations in Rails (4.1). The Address and Phone objects can belong to either a Person or an Organization object. All of the plumbing appears to work correctly - the CRUD operations are all working as they should and all my tests pass. The show action for both Person and Organization includes a partial that is supposed to display the related Addresses and Phones. While those fields do display correctly, the entire Ruby object also renders as a string in the HTML stream, and that is of course problematic. The show action of the PeopleController:I have a couple of simple polymorphic relations




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: