From b80bd744ad873f6fc43018bc4bfb90677de167bd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 17 Dec 2012 12:01:45 +0100 Subject: Start of GS5. --- db/migrate/20120515124103_add_hold_softkey_function.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 db/migrate/20120515124103_add_hold_softkey_function.rb (limited to 'db/migrate/20120515124103_add_hold_softkey_function.rb') diff --git a/db/migrate/20120515124103_add_hold_softkey_function.rb b/db/migrate/20120515124103_add_hold_softkey_function.rb new file mode 100644 index 0000000..4e16587 --- /dev/null +++ b/db/migrate/20120515124103_add_hold_softkey_function.rb @@ -0,0 +1,14 @@ +class AddHoldSoftkeyFunction < ActiveRecord::Migration + def up + softkey_function = SoftkeyFunction.find_or_create_by_name('hold') + gui_function = GuiFunction.find_or_create_by_name("softkey_function_#{softkey_function.name.downcase}_field_in_softkey_form", + :category => 'Softkey edit view', + :description => "Show the softkey function '#{softkey_function.name}' in the softkey form.") + end + + def down + softkey_function = SoftkeyFunction.find_by_name('hold') + softkey_function.destroy + GuiFunction.find_by_name("softkey_function_#{softkey_function.name.downcase}_field_in_softkey_form").destroy + end +end -- cgit v1.2.3