Class: ActionController::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/extensions/action_controller/response.rb

Instance Method Summary collapse

Instance Method Details

#valid_tml?Boolean

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.

Returns:

  • (Boolean)


5
6
7
8
9
10
# File 'lib/extensions/action_controller/response.rb', line 5

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