diff --git a/CHANGELOG.md b/CHANGELOG.md index 5669c81..7d34cae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# ActiveAttr 0.15.5 (October 10, 2023) +# ActiveAttr 0.16.0 (October 11, 2023) * ActiveAttr now supports Ruby 3.1 * ActiveAttr now supports Ruby 3.2 diff --git a/lib/active_attr/attributes.rb b/lib/active_attr/attributes.rb index d385690..f1552f7 100644 --- a/lib/active_attr/attributes.rb +++ b/lib/active_attr/attributes.rb @@ -66,7 +66,7 @@ def self.filter_attributes=(new_filter_attributes) class_attribute :filter_attributes, :instance_writer => false self.filter_attributes = Attributes.filter_attributes - attribute_method_suffix "" if attribute_method_matchers.none? { |matcher| matcher.prefix == "" && matcher.suffix == "" } + attribute_method_suffix "" if attribute_method_patterns.none? { |matcher| matcher.prefix == "" && matcher.suffix == "" } attribute_method_suffix "=" end @@ -323,6 +323,14 @@ def inspect "#{name}#{attributes_list}" end + # Renamed in ActiveModel 7.1 + # + # @private + # @since 0.16.0 + def attribute_method_patterns + attribute_method_matchers + end unless method_defined?(:attribute_method_patterns) + protected # Assign a set of attribute definitions, used when subclassing models @@ -346,7 +354,7 @@ def instance_method_already_implemented?(method_name) # # @since 0.6.0 def attribute_methods(name) - attribute_method_matchers.map { |matcher| matcher.method_name name } + attribute_method_patterns.map { |matcher| matcher.method_name name } end # Ruby inherited hook to assign superclass attributes to subclasses diff --git a/lib/active_attr/version.rb b/lib/active_attr/version.rb index b98e590..24edf89 100644 --- a/lib/active_attr/version.rb +++ b/lib/active_attr/version.rb @@ -1,5 +1,5 @@ module ActiveAttr # Complete version string # @since 0.1.0 - VERSION = "0.15.5" + VERSION = "0.16.0" end