Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing :if condition on instance creation #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Simbul
Copy link

@Simbul Simbul commented Oct 13, 2011

Fix: when saving a versioned model for the first time (e.g. creating) a version was always saved, even with a false :if condition. No version should be saved when the :if condition is false.

This means that a saved instance of a model may have:

my_model.version.nil? # true
my_model.versions.empty? # true

This sounds acceptable to me though.

Alessandro Morandi and others added 3 commits October 13, 2011 14:16
… a version was always saved, even with a false :if condition. No version should be saved when the :if condition is false.
Conflicts:
	lib/acts_as_versioned.rb
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.

None yet

2 participants