Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3415

callback after_save not returning any values

      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 Durran Jordan
            Reporter:
            Manju244 Manju244 [X]
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: