callback after_save not returning any values

XMLWordPrintableJSON

    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I am working with latest version on Mongoid and Rails4

      my code stuff is like this,

      class Example
        include Mongoid::Document
        include Mongoid::Timestamps
      
        field :a, type: Integer
      
        after_create :haha
      
        def haha
        	if a.nil?
        	 	destroy
        	end 
        end
      end
      

      The callback is not happening. Even if the "a" in not nil not storing after_create.

              Assignee:
              Durran Jordan
              Reporter:
              Manju244 [X]
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: