You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The model including ActiveAttr::Model should reject attribute changes by throwing FrozenError after#freeze is called.
Reproduction
require"bundler/inline"gemfile(true)dogem"active_attr",git: "https://github.com/cgriego/active_attr.git"gem"rspec"endrequire"rspec/autorun"classFooincludeActiveAttr::Modelattribute:quxendRSpec.describedoit"raises FrozenError"dofoo=Foo.new.freezeexpect{foo.qux="grault"# ==> does not throw FrozenError!}.toraise_error(FrozenError)endend
Behavior of ActiveModel::Model
ActiveModel::Model does not allow attribute changes.
I think it is an ideal behavior.
Summary
The model including
ActiveAttr::Model
should reject attribute changes by throwing FrozenError after#freeze
is called.Reproduction
Behavior of
ActiveModel::Model
ActiveModel::Model
does not allow attribute changes.I think it is an ideal behavior.
The text was updated successfully, but these errors were encountered: