Sha256: 98c1e976a8eaba8bc677e202469fe60dec8208c2682d9d9755164ec05a95e33d

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

module ActionController
  class Response
    # Returns true if this response is well-formed XML, follows the TML syntactic rules, and has a format :rtml_helpers or :tml.
    # Raises an error if any of these are false.
    def valid_tml?
      unless template.template_format == :rtml || template.template_format == :tml
        raise "Expected format to be :rtml or :tml, found #{template.template_format.inspect}"
      end
      body.valid_tml?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rtml-2.0.4 lib/extensions/action_controller/response.rb