1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove deprecated ActionView::Template#updated_at

This commit is contained in:
Rafael Mendonça França 2020-05-05 19:23:24 -04:00
parent d25840eb49
commit b88615e875
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948
3 changed files with 16 additions and 11 deletions

View file

@ -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*

View file

@ -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

View file

@ -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`.