ruby on rails - Mongoid Alize - alize does not work with default scope -


मेरे पास मॉडल संरचना है जैसे:

  क्लास उपयोगकर्ता में मोनोगाईड :: दस्तावेज़ शामिल हैं मोंगॉयड :: अलाइज फ़ील्ड: नाम फ़ील्ड: दृश्यमान, प्रकार: मोगुएड :: बूलियन डिफ़ॉल्ट_सस्कोप - & gt; {Where (visible: true)} has_many: posts end class post में शामिल हैं मोनोगाईड :: दस्तावेज मोंगॉयड :: अलाइज फ़ील्ड: दृश्यमान, प्रकार: मोंगिएड :: बूलियन डिफॉल्ट_स्कॉप - & gt; {जहां (दृश्यमान: सच है, 'user_fields.lookable' = & gt; सच)} belong_to: उपयोगकर्ता alize: user,: visible end  

जब मैं पोस्ट और उपयोगकर्ता को दिखाई देता है: यह सच है काम करता है, लेकिन denormalization काम नहीं करता है जब मैं दिखाई देता है: पोस्ट उदाहरण में गलत। मैं 'अनसॉक्ड' के माध्यम से काम करने के लिए कैसे अलविदा कह सकता हूं? अनुलेख मेरे बुरे अंग्रेजी के लिए क्षमा करें।


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

c# - How to know the number of Threads created and limit the Tasks accordingly -

javascript - Knockout unexpected identifier "." -