Rails 4.2 call save in getter
method causes "instance variable @cached_changed_attributes not defined" bug.
#20531
Labels
getter
method causes "instance variable @cached_changed_attributes not defined" bug.
#20531
If I overwrite a getter method and call save inside it like
cache_changed_attributes
will raise instance variable @cached_changed_attributes not defined exception. because it will be called twice, the one inside yield removed @cached_changed_attributes so the second time, remove_instance_variable(:@cached_changed_attributes) can not find @cached_changed_attributes.I've created test case here https://gist.github.com/raven-chen/fc5669ecda5f8b62e2fa
the change that bring this bug made here 9384fa43c
The text was updated successfully, but these errors were encountered: