Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

Commit

Permalink
change render text to render plain for rails 5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mbryja-enova committed Nov 24, 2020
1 parent 9802a51 commit 63e6a47
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/landable/api/templates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def preview

respond_to do |format|
format.html do
render text: content, layout: false, content_type: 'text/html'
render plain: content, layout: false, content_type: 'text/html'
end

format.json do
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/landable/api/themes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def preview

respond_to do |format|
format.html do
render text: content, layout: false, content_type: 'text/html'
render plain: content, layout: false, content_type: 'text/html'
end

format.json do
Expand Down
2 changes: 1 addition & 1 deletion app/responders/landable/page_render_responder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def to_html
page = resource

case page.status_code
when 200 then render text: RenderService.call(page, preview: options[:preview], responder: self), content_type: page.content_type, layout: (page.theme.try(:file) || false)
when 200 then render plain: RenderService.call(page, preview: options[:preview], responder: self), content_type: page.content_type, layout: (page.theme.try(:file) || false)
when 301, 302 then redirect_to page.redirect_url, status: page.status_code
else fail page.error
end
Expand Down
2 changes: 1 addition & 1 deletion lib/landable/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Landable
module VERSION
MAJOR = 1
MINOR = 99
PATCH = 3
PATCH = 4

STRING = [MAJOR, MINOR, PATCH].compact.join('.')
end
Expand Down

0 comments on commit 63e6a47

Please sign in to comment.