From b6ca062670b342344df08b53fb216db619ef42bc Mon Sep 17 00:00:00 2001 From: Nicolas Braud-Santoni Date: Sun, 7 Aug 2016 16:39:42 +0200 Subject: Import legacy manman source Copied from www.ffgraz.net --- app/helpers/application_helper.rb | 11 +++++++++++ app/helpers/export_helper.rb | 2 ++ app/helpers/location_helper.rb | 3 +++ app/helpers/net_helper.rb | 2 ++ app/helpers/node_helper.rb | 2 ++ app/helpers/person_helper.rb | 2 ++ 6 files changed, 22 insertions(+) create mode 100644 app/helpers/application_helper.rb create mode 100644 app/helpers/export_helper.rb create mode 100644 app/helpers/location_helper.rb create mode 100644 app/helpers/net_helper.rb create mode 100644 app/helpers/node_helper.rb create mode 100644 app/helpers/person_helper.rb (limited to 'app/helpers') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb new file mode 100644 index 0000000..ebf937a --- /dev/null +++ b/app/helpers/application_helper.rb @@ -0,0 +1,11 @@ +# Methods added to this helper will be available to all templates in the application. +module ApplicationHelper + def ifnil(value=nil) + yield + rescue NoMethodError + raise unless $!.message =~ /:NilClass$/ + value + end + + +end diff --git a/app/helpers/export_helper.rb b/app/helpers/export_helper.rb new file mode 100644 index 0000000..34acf5f --- /dev/null +++ b/app/helpers/export_helper.rb @@ -0,0 +1,2 @@ +module ExportHelper +end diff --git a/app/helpers/location_helper.rb b/app/helpers/location_helper.rb new file mode 100644 index 0000000..16aee7c --- /dev/null +++ b/app/helpers/location_helper.rb @@ -0,0 +1,3 @@ +module LocationHelper + +end diff --git a/app/helpers/net_helper.rb b/app/helpers/net_helper.rb new file mode 100644 index 0000000..908cd46 --- /dev/null +++ b/app/helpers/net_helper.rb @@ -0,0 +1,2 @@ +module NetHelper +end diff --git a/app/helpers/node_helper.rb b/app/helpers/node_helper.rb new file mode 100644 index 0000000..ff049b0 --- /dev/null +++ b/app/helpers/node_helper.rb @@ -0,0 +1,2 @@ +module NodeHelper +end diff --git a/app/helpers/person_helper.rb b/app/helpers/person_helper.rb new file mode 100644 index 0000000..f5c74cd --- /dev/null +++ b/app/helpers/person_helper.rb @@ -0,0 +1,2 @@ +module PersonHelper +end -- cgit v1.2.1