Skip to content
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

Merged
merged 1 commit into from
Feb 20, 2019
Merged

Conversation

tenderlove
Copy link
Member

We no longer depend on rendered_format side effects, so we can remove
this method now. 馃帀

We no longer depend on `rendered_format` side effects, so we can remove
this method now. 馃帀
@rails-bot rails-bot bot added the actionview label Feb 19, 2019
@tenderlove tenderlove merged commit 982c46a into master Feb 20, 2019
@tenderlove tenderlove deleted the depreate-rendered-format branch February 20, 2019 00:43
@@ -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=
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member Author

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

Copy link
Contributor

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?

Copy link
Member Author

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!

oieioi added a commit to oieioi/view_source_map that referenced this pull request Aug 20, 2019
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)
oieioi added a commit to oieioi/view_source_map that referenced this pull request Aug 20, 2019
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)
oieioi added a commit to oieioi/view_source_map that referenced this pull request Aug 20, 2019
- `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)
oieioi added a commit to oieioi/view_source_map that referenced this pull request Aug 20, 2019
- `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)
oieioi added a commit to oieioi/view_source_map that referenced this pull request Aug 20, 2019
- `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)
oieioi added a commit to oieioi/view_source_map that referenced this pull request Aug 20, 2019
- `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)
oieioi added a commit to oieioi/view_source_map that referenced this pull request Aug 20, 2019
- `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)
oieioi added a commit to oieioi/view_source_map that referenced this pull request Aug 20, 2019
- `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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants