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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5 deprecation warning #50

Closed
connorshea opened this issue Jul 27, 2016 · 3 comments
Closed

Rails 5 deprecation warning #50

connorshea opened this issue Jul 27, 2016 · 3 comments

Comments

@connorshea
Copy link

I've been testing GitLab with Rails 5, and ran into this deprecation warning when I went to our Letter Opener route:

Started GET "/rails/letter_opener/1468524894_56e3355/rich" for 127.0.0.1 at 2016-07-27 14:05:57 -0600
Processing by LetterOpenerWeb::LettersController#show as HTML
  Parameters: {"id"=>"1468524894_56e3355", "style"=>"rich"}
DEPRECATION WARNING: `render :text` is deprecated because it does not actually render a `text/plain` response. Switch to `render plain: 'plain text'` to render as `text/plain`, `render html: '<strong>HTML</strong>'` to render as `text/html`, or `render body: 'raw'` to match the deprecated behavior and render with the default Content-Type, which is `text/plain`.

Context of deprecating this:

I can provide an example app if you'd like me to.

@harigopal
Copy link

Related to above, there are deprecation warnings on boot:

DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1.
Use before_action instead. (called from <class:LettersController> at
.../letter_opener_web-1.3.0/app/controllers/letter_opener_web/letters_controller.rb:5)

These being the culprit:

https://github.com/fgrehm/letter_opener_web/blob/master/app/controllers/letter_opener_web/letters_controller.rb#L5-L6

@josisusan
Copy link
Contributor

The fix can be found on #54

@pseudomuto
Copy link
Collaborator

This is resolved on master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants