# typed: strict
module ImmutableModel
  extend T::Sig
  extend T::Helpers
  extend ActiveSupport::Concern

  requires_ancestor { ReduxApplicationRecord }

  included do
    T.bind(self, T.class_of(ReduxApplicationRecord))

    before_update { raise ActiveRecord::ReadOnlyRecord }
  end
end
