Skip to content

Commit

Permalink
Patch for newer Rails versions not supporting text option for render
Browse files Browse the repository at this point in the history
Calling `render text: ...` has been deprecated in `rails@5.1`.

This commit [replaces `text:` with `html:`][docs].

[docs]: http://guides.rubyonrails.org/layouts_and_rendering.html#rendering-html
  • Loading branch information
weggesser authored and seanpdoyle committed May 12, 2017
1 parent bd18720 commit 585cfea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
master
------

* Use `Mime::Type.html?`
* Call `render` with `html:` instead of `text:`. [#519]
* Use `Mime::Type.html?` [#523]

[#519]: https://github.com/thoughtbot/ember-cli-rails/pull/519
[#523]: https://github.com/thoughtbot/ember-cli-rails/pull/523

0.8.4
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/ember_rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ def render_ember_app(name, &block)

head, body = markup_capturer.capture

render text: EmberCli[name].index_html(head: head, body: body).html_safe
render html: EmberCli[name].index_html(head: head, body: body).html_safe
end
end

0 comments on commit 585cfea

Please sign in to comment.