diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md index bf9d5829ed..0782b917f4 100644 --- a/actionview/CHANGELOG.md +++ b/actionview/CHANGELOG.md @@ -1,3 +1,11 @@ +* Remove deprecated `ActionView::Template#updated_at`. + + *Rafael Mendonça França* + +* Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`. + + *Rafael Mendonça França* + * Make `locals` argument required on `ActionView::Template#initialize`. *Rafael Mendonça França* diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index 53a38b8767..d9487141bd 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -114,10 +114,10 @@ module ActionView extend Template::Handlers - attr_reader :identifier, :handler, :original_encoding, :updated_at + attr_reader :identifier, :handler, :original_encoding attr_reader :variable, :format, :variant, :locals, :virtual_path - def initialize(source, identifier, handler, locals:, format: nil, variant: nil, virtual_path: nil, updated_at: nil) + def initialize(source, identifier, handler, locals:, format: nil, variant: nil, virtual_path: nil) @source = source @identifier = identifier @handler = handler @@ -131,19 +131,12 @@ module ActionView $1.to_sym end - if updated_at - ActiveSupport::Deprecation.warn "ActionView::Template#updated_at is deprecated" - @updated_at = updated_at - else - @updated_at = Time.now - end @format = format @variant = variant @compile_mutex = Mutex.new end deprecate :original_encoding - deprecate :updated_at deprecate def virtual_path=(_); end deprecate def formats=(_); end deprecate def formats; Array(format); end @@ -239,11 +232,11 @@ module ActionView # to ensure that references to the template object can be marshalled as well. This means forgoing # the marshalling of the compiler mutex and instantiating that again on unmarshalling. def marshal_dump # :nodoc: - [ @source, @identifier, @handler, @compiled, @locals, @virtual_path, @updated_at, @format, @variant ] + [ @source, @identifier, @handler, @compiled, @locals, @virtual_path, @format, @variant ] end def marshal_load(array) # :nodoc: - @source, @identifier, @handler, @compiled, @locals, @virtual_path, @updated_at, @format, @variant = *array + @source, @identifier, @handler, @compiled, @locals, @virtual_path, @format, @variant = *array @compile_mutex = Mutex.new end diff --git a/guides/source/6_1_release_notes.md b/guides/source/6_1_release_notes.md index fb23955f7c..4db8c19c0a 100644 --- a/guides/source/6_1_release_notes.md +++ b/guides/source/6_1_release_notes.md @@ -55,6 +55,10 @@ Please refer to the [Changelog][action-pack] for detailed changes. ### Removals +* Remove deprecated `ActionView::Template#updated_at`. + +* Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`. + * Make `locals` argument required on `ActionView::Template#initialize`. * Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.