summaryrefslogtreecommitdiff
path: root/app/helpers/flash_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/flash_helper.rb')
-rw-r--r--app/helpers/flash_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/flash_helper.rb b/app/helpers/flash_helper.rb
new file mode 100644
index 00000000000..26572d4f206
--- /dev/null
+++ b/app/helpers/flash_helper.rb
@@ -0,0 +1,8 @@
+module FlashHelper
+ def get_body_data_page(path)
+ return unless path.empty? == false
+
+ path_controller = Rails.application.routes.recognize_path(path)
+ [path_controller[:controller].split('/'), path_controller[:action]].compact.join(':')
+ end
+end