سؤال

I've had a problem with our web application, since Wednesday. I've been trying to fix it, but I have run out of ideas.

So, I've created a mini Ruby on Rails application that reproduces my problem to be easy for everyone to understand, and hopefully help me out with the problem:

https://github.com/davidslvto/project-problem

I have inserted a screenshot to show you what is the problem.

I really don't get out could I fix this, in the real application I have not 1 nested resource but 4. And I have created this one in Rails 3.1.3 because I was getting some errors with attr_accessible ( in the real one is rails 3.2.6)

Hope you guys can help me, because I'm really lost right now. Thank you

هل كانت مفيدة؟

المحلول

I fixed the problem.

The first problem was that I misunderstood the globalize_fields_for. The second problem was related with the nested resource, somehow rails don't get the relation and I had to write it.

You can see the fix in this commit

https://github.com/davidslvto/project-problem/commit/1681302ccd06ba96d882da88d599c753663ec46b

Hope this helps someone.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top