mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make locals
argument required on ActionView::Template#initialize
This commit is contained in:
parent
71ddfd78d4
commit
d25840eb49
3 changed files with 7 additions and 7 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
* Make `locals` argument required on `ActionView::Template#initialize`.
|
||||||
|
|
||||||
|
*Rafael Mendonça França*
|
||||||
|
|
||||||
* Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
|
* Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
|
||||||
|
|
||||||
*Rafael Mendonça França*
|
*Rafael Mendonça França*
|
||||||
|
|
|
@ -117,12 +117,7 @@ module ActionView
|
||||||
attr_reader :identifier, :handler, :original_encoding, :updated_at
|
attr_reader :identifier, :handler, :original_encoding, :updated_at
|
||||||
attr_reader :variable, :format, :variant, :locals, :virtual_path
|
attr_reader :variable, :format, :variant, :locals, :virtual_path
|
||||||
|
|
||||||
def initialize(source, identifier, handler, format: nil, variant: nil, locals: nil, virtual_path: nil, updated_at: nil)
|
def initialize(source, identifier, handler, locals:, format: nil, variant: nil, virtual_path: nil, updated_at: nil)
|
||||||
unless locals
|
|
||||||
ActiveSupport::Deprecation.warn "ActionView::Template#initialize requires a locals parameter"
|
|
||||||
locals = []
|
|
||||||
end
|
|
||||||
|
|
||||||
@source = source
|
@source = source
|
||||||
@identifier = identifier
|
@identifier = identifier
|
||||||
@handler = handler
|
@handler = handler
|
||||||
|
@ -150,7 +145,6 @@ module ActionView
|
||||||
deprecate :original_encoding
|
deprecate :original_encoding
|
||||||
deprecate :updated_at
|
deprecate :updated_at
|
||||||
deprecate def virtual_path=(_); end
|
deprecate def virtual_path=(_); end
|
||||||
deprecate def locals=(_); end
|
|
||||||
deprecate def formats=(_); end
|
deprecate def formats=(_); end
|
||||||
deprecate def formats; Array(format); end
|
deprecate def formats; Array(format); end
|
||||||
deprecate def variants=(_); end
|
deprecate def variants=(_); end
|
||||||
|
|
|
@ -55,6 +55,8 @@ Please refer to the [Changelog][action-pack] for detailed changes.
|
||||||
|
|
||||||
### Removals
|
### Removals
|
||||||
|
|
||||||
|
* Make `locals` argument required on `ActionView::Template#initialize`.
|
||||||
|
|
||||||
* Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
|
* Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
|
||||||
|
|
||||||
* Remove deprecated `config.action_view.finalize_compiled_template_methods`
|
* Remove deprecated `config.action_view.finalize_compiled_template_methods`
|
||||||
|
|
Loading…
Reference in a new issue