New value of attribute reset in after_inilialize callback ...

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 3.0.14
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hi.
      I have user class. and User has one profile.
      Profile has enable attribute.

      If I do next:
      user.profile.enable = true;
      user.save!

      It work ok and new value (true) stored in DB successful.

      But if I have any :after_initialize callback.
      Then after save field "enable" leaves in false state.

      Why?
      Is this a bug or a feature?

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

              Created:
              Updated:
              Resolved: