lib/payanyway/controller.rb in payanyway-2.2.1 vs lib/payanyway/controller.rb in payanyway-2.2.2

- old
+ new

@@ -10,10 +10,14 @@ request = Payanyway::Request::Pay.new(permitted_params) request.success? ? pay_implementation(request.pretty_params) : Rails.logger.error(request.error_message) - render plain: request.response + if Gem::Version.new(Rails.version) < Gem::Version.new('5.1') + render text: request.response + else + render plain: request.response + end end def success request = Payanyway::Request::Base.new(permitted_params)