2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/rtml/controller/render_helpers.rb', line 2
def render_with_rtml_option(options = nil, = {}, &block)
if (h = options).is_a?(Hash) || (h = ).is_a?(Hash)
h = if !h.key?(:rtml) && .is_a?(Hash)
if rtml_action = h.delete(:rtml)
if rtml_helpers.respond_to?(rtml_action)
request.format = :rtml
rtml_helpers.send(rtml_action)
response.template.template_format = :rtml
tml = rtml_document.to_tml
if Rtml.configuration.log_tml
Rails.logger.debug tml
end
return render_without_rtml_option(h.merge(:text => tml))
else
raise Rtml::Errors::UnknownRtmlAction,
"No RTML action responded to #{rtml_action}. RTML actions: #{rtml_actions.sort.to_sentence(:locale => :en)}",
caller
end
end
end
render_without_rtml_option(options, , &block)
end
|