44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/hiccdown/railtie.rb', line 44
def custom_render *args
options = args.
if options.empty? && args.empty?
custom_default_render
elsif options.key?(:action) || args.first.is_a?(Symbol) || (args.first.is_a?(String) && !args.first.include?('/'))
action_name = options[:action] || args.first.to_s
render_helper_method(action_name, options)
elsif options.key?(:template) && !view_context.lookup_context.template_exists?(options[:template])
action_name = options[:template].split('/').last
render_helper_method(action_name, options)
else
original_render(*args, options)
end
end
|