के साथ डेटाटाइम_सेलेक्ट का उपयोग नहीं कर सकता हर बार जब मैं एक दृश्य में डेटाटाइम_क्लेक्ट का उपयोग करने का प्रयास करता हूं, तो ऐप एक विशेषता त्रुटि फेंकता है।Mongoid
Mongoid::Errors::UnknownAttribute:
Problem:
Attempted to set a value for 'fromtime(1i)' which is not allowed on the model Event.
Summary:
Without including Mongoid::Attributes::Dynamic in your model and the attribute does not already exist in the attributes hash, attempting to call Event#fromtime(1i)= for it is not allowed. This is also triggered by passing the attribute to any method that accepts an attributes hash, and is raised instead of getting a NoMethodError.
Resolution:
You can include Mongoid::Attributes::Dynamic if you expect to be writing values for undefined fields often.
मैं जिस समाधान में अक्सर आया हूं वह मॉडल में Mongoid :: MultiParameterAttributes शामिल करना था। दुर्भाग्यवश कि मॉड्यूल हटा दिया गया है! https://github.com/mongoid/mongoid/issues/2954
मैंने मणि को तोड़ने और मल्टीपार्मेटर एट्रिब्यूट मॉड्यूल को दोबारा जोड़ने की कोशिश की है, लेकिन मणि lib फ़ाइल से कोड नहीं पढ़ेगा। क्या Mongoid के साथ DateTime_select का उपयोग करने का कोई तरीका है?
क्या आप अपने डेटा की संरचना और आप अपने डेटा तक पहुंचने का प्रयास करने के बारे में कुछ और जानकारी प्रदान कर सकते हैं? – xlembouras