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

Already on GitHub? Sign in to your account

3 0 stable #2175

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

hmcfletch commented Jul 21, 2011

Resolution for Issue 2074

Default values that are dependent on other attributes aren't getting set in after_initialize if create is called with a block to set the initial attributes.

hmcfletch added some commits Jul 21, 2011

fix Issue 2074
combination of create using a block to set attributes and after_initialize to set defaults was causing incorrect behavior

cldwalker added a commit to cldwalker/rails that referenced this pull request Jul 23, 2011

fix after_initialize edge case (close #2074 and close #2175)
fix behavior when after_initialize is defined and a block is passed to Base.create

cldwalker added a commit to cldwalker/rails that referenced this pull request Jul 24, 2011

fix after_initialize edge case (close #2074 and close #2175)
fix behavior when after_initialize is defined and a block is passed to Base.create

@vijaydev vijaydev closed this Nov 22, 2011

Member

vijaydev commented Nov 22, 2011

Since the fix in #2236 is merged in master, it will be better to backport that.

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