2010-03-03 03:42:51 -05:00
|
|
|
module ActionController
|
|
|
|
module ImplicitRender
|
2011-03-29 13:30:59 -04:00
|
|
|
def send_action(method, *args)
|
2011-05-06 12:39:10 -04:00
|
|
|
ret = super
|
2012-01-19 15:25:52 -05:00
|
|
|
default_render unless performed?
|
2011-05-06 12:39:10 -04:00
|
|
|
ret
|
2010-03-03 03:42:51 -05:00
|
|
|
end
|
|
|
|
|
2011-03-31 12:25:29 -04:00
|
|
|
def default_render(*args)
|
|
|
|
render(*args)
|
2010-03-03 03:42:51 -05:00
|
|
|
end
|
|
|
|
|
2011-05-06 12:39:10 -04:00
|
|
|
def method_for_action(action_name)
|
|
|
|
super || if template_exists?(action_name.to_s, _prefixes)
|
|
|
|
"default_render"
|
|
|
|
end
|
2010-03-03 03:42:51 -05:00
|
|
|
end
|
|
|
|
end
|
2010-09-17 16:39:14 -04:00
|
|
|
end
|