Skip to content

Can't modify frozen NilClass #11

@estiens

Description

@estiens

I often run into an issue with this like in dirty.rb (106)

original.instance_variable_set "@value_before_type_cast", record["previous_attributes"][key]

if I am doing active dev work and the database attributes get out of sync with the model, would be nice to have some kind of rescue in the dirty tracking that doesn't throw an exception

FrozenError: can't modify frozen NilClass: nil
from /Users/estiens/.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/bundler/gems/all_futures-ecec2e88d6d6/lib/all_futures/dirty.rb:106:in `instance_variable_set

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions