diff options
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 240df61..da6cf3e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -64,6 +64,22 @@ class ApplicationController < ActionController::Base end end + # + # same as render page, but returns the string + # + def page_body(page) + begin + render_to_string :template => page.template_path + rescue ActionView::MissingTemplate => exc + begin + render_to_string :template => page.template_path(DEFAULT_LOCALE) + rescue + raise exc + end + end + end + helper_method :page_body + ## ## INITIALIZATION ## |