-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate LookupContext#rendered_format #35331
Conversation
We no longer depend on `rendered_format` side effects, so we can remove this method now. 馃帀
@@ -16,6 +16,8 @@ module ActionView | |||
# only once during the request, it speeds up all cache accesses. | |||
class LookupContext #:nodoc: | |||
attr_accessor :prefixes, :rendered_format | |||
deprecate :rendered_format | |||
deprecate :rendered_format= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LookupContext is private API, why bother deprecating the attribute reader/writer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hehe, I'll 鉁傦笍. No reason really.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I wanted to make 100% sure nobody else was calling it, and it looks like not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing that @tenderlove! This is a method being used by the rabl-rails
gem as we just noticed the warning on upgrading Rails. We'll work on an update to resolve the deprecation.
Is there an alternative to finding out the rendered format for an action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@javierjulio you should be able to get the format from the rendered_template
. 62cb3ee may help. Let me know if I can help more!
The following items were supported. - `TemplateRenderer#render_template` has 4 arguments. (rails/rails#35031) - `PartialRenderer#render` returns `RenderedTemplate` or `CollectionTemplate` but String. (rails/rails#35076) - `LookupContext#rendered_format` is deprecated. (rails/rails#35331)
The following items were supported. - `TemplateRenderer#render_template` has 4 arguments. (rails/rails#35031) - `PartialRenderer#render` returns `RenderedTemplate` or `CollectionTemplate` but String. (rails/rails#35265) - `LookupContext#rendered_format` is deprecated. (rails/rails#35331)
- `TemplateRenderer#render_template` has 4 arguments. (rails/rails#35031) - `PartialRenderer#render` returns `RenderedTemplate` or `CollectionTemplate` but String. (rails/rails#35265) - `LookupContext#rendered_format` is deprecated. (rails/rails#35331) (https://github.com/rails/rails/pull/35265/files#diff-bd7d0105f7d1dfa41a0f3e033c2688e8L317-L324)
- `TemplateRenderer#render_template` has 4 arguments. (rails/rails#35031) - `PartialRenderer#render` returns `RenderedTemplate` or `CollectionTemplate` but String. (rails/rails#35265) - `LookupContext#rendered_format` is deprecated. (rails/rails#35331) (https://github.com/rails/rails/pull/35265/files#diff-bd7d0105f7d1dfa41a0f3e033c2688e8L317-L324)
- `TemplateRenderer#render_template` has 4 arguments. (rails/rails#35031) - `PartialRenderer#render` returns not `String` but `RenderedTemplate` or `CollectionTemplate`. (rails/rails#35265) - `LookupContext#rendered_format` is deprecated. (rails/rails#35331) (https://github.com/rails/rails/pull/35265/files#diff-bd7d0105f7d1dfa41a0f3e033c2688e8L317-L324)
- `TemplateRenderer#render_template` has 4 arguments. (rails/rails#35031) - `PartialRenderer#render` returns not `String` but `RenderedTemplate` or `CollectionTemplate`. (rails/rails#35265) - `LookupContext#rendered_format` is deprecated. (rails/rails#35331) (https://github.com/rails/rails/pull/35265/files#diff-bd7d0105f7d1dfa41a0f3e033c2688e8L317-L324)
- `TemplateRenderer#render_template` has 4 arguments. (rails/rails#35031) - `PartialRenderer#render` returns not `String` but `RenderedTemplate` or `RenderedCollection`. (rails/rails#35265) - `LookupContext#rendered_format` is deprecated. (rails/rails#35331) (https://github.com/rails/rails/pull/35265/files#diff-bd7d0105f7d1dfa41a0f3e033c2688e8L317-L324)
- `TemplateRenderer#render_template` has 4 arguments. (rails/rails#35031) - `PartialRenderer#render` returns not `String` but `RenderedTemplate` or `RenderedCollection`. (rails/rails#35265) - `LookupContext#rendered_format` is deprecated. (rails/rails#35331) (https://github.com/rails/rails/pull/35265/files#diff-bd7d0105f7d1dfa41a0f3e033c2688e8L317-L324)
We no longer depend on
rendered_format
side effects, so we can removethis method now. 馃帀