3

I have created Model "House".

I followed this tutorial.

I created my scaffold and I go to my model after I add:

field :published_on, :type => Date;

Then I see the calendar in views for update the views like tutorial, but when I update the DATE in not appear the date.

I followed the tutorial, but to create or update date not appear.

What's the problem?

2 Answers 2

6

Problem fixed!

For every people that working with Date and DateTime in mongoid 2.0 or higher, must add to your model the next code:

include Mongoid::MultiParameterAttributes

The problem is fixed in this link:

https://github.com/mongoid/mongoid/issues/30#issuecomment-1211911

0

You manually added the field :published_on, did you also add it to attr_accessible?

1
  • I had add manually the field :published_on to scaffold. The attr_accessible :published_on not working in mongoid is ignored. Thank you very much
    – hyperrjas
    Oct 3, 2011 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.