diff --git a/CHANGES.md b/CHANGES.md index 700212c..f9473a9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +# 0.2.5 + +* Fix: Delegating from form object causes ArgumentError with 0.2.4 (https://github.com/trailblazer/reform-rails/issues/99) + # 0.2.4 * Fix keyword argument warning in `method_missing` (https://github.com/trailblazer/reform-rails/pull/97) diff --git a/lib/reform/form/active_model.rb b/lib/reform/form/active_model.rb index cea7352..4bc6fb2 100644 --- a/lib/reform/form/active_model.rb +++ b/lib/reform/form/active_model.rb @@ -4,8 +4,7 @@ def self.included(base) extend ClassMethods register_feature ActiveModel - extend Forwardable - def_delegators :model, :persisted?, :to_key, :to_param, :id + delegate :persisted?, :to_key, :to_param, :id, to: :model def to_model # this is called somewhere in FormBuilder and ActionController. self diff --git a/lib/reform/rails/version.rb b/lib/reform/rails/version.rb index 4955259..8ca420b 100644 --- a/lib/reform/rails/version.rb +++ b/lib/reform/rails/version.rb @@ -1,5 +1,5 @@ module Reform module Rails - VERSION = "0.2.4" + VERSION = "0.2.5" end end