Skip to content

Conversation

@samknight
Copy link

Not found an existing test strategy for existing 'save' callbacks so happy discuss about where and how you'd like these tested

@jcutrell
Copy link
Collaborator

jcutrell commented Jun 6, 2014

Anyone see any reason not to merge this in?

@desmondhume
Copy link

Hi, I'm trying to make after_save callback work, but it seems to be completely ignored.
I'm using your fork in my Gemfile:

gem 'parse_resource', github: 'samknight/parse_resource', branch: 'add_callbacks_create_and_update'

and in my user.rb

class User < ParseUser
  after_save :restart_verification_process

  def restart_verification_process
    Rails.logger.info "Restarting verification process..."
  end
end

When I save or update the user, the callback is ignored. Any suggestion?

@samknight
Copy link
Author

Thanks for testing @desmondhume. I've only added the callbacks for Create and Update thus far. It wasn't required for what I was dealing with and I believe on initial try it was more complicated to implement. I'm happy to try and add it before this is merged if that's the consensus - although I am no longer actively working on a parse project currently

@desmondhume
Copy link

Ok, actually my need is only update, so I'm changing my code to use after_update callback, but it does not seem to work.

after_update :restart_verification_process

Am I missing something?
Thank you for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants