From 6b1bd9a45eb5bf68e439f8211b228e215bcbb7f7 Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Thu, 8 Aug 2019 21:46:26 +0200 Subject: [PATCH] Created Unit model command: rails generate redmine_plugin_model body_tracking unit name:string shortname:string type:integer --- app/models/unit.rb | 2 ++ db/migrate/001_create_units.rb | 9 +++++++++ test/unit/unit_test.rb | 9 +++++++++ 3 files changed, 20 insertions(+) create mode 100644 app/models/unit.rb create mode 100644 db/migrate/001_create_units.rb create mode 100644 test/unit/unit_test.rb diff --git a/app/models/unit.rb b/app/models/unit.rb new file mode 100644 index 0000000..ee09039 --- /dev/null +++ b/app/models/unit.rb @@ -0,0 +1,2 @@ +class Unit < ActiveRecord::Base +end diff --git a/db/migrate/001_create_units.rb b/db/migrate/001_create_units.rb new file mode 100644 index 0000000..48d3f65 --- /dev/null +++ b/db/migrate/001_create_units.rb @@ -0,0 +1,9 @@ +class CreateUnits < ActiveRecord::Migration + def change + create_table :units do |t| + t.string :name + t.string :shortname + t.integer :type + end + end +end diff --git a/test/unit/unit_test.rb b/test/unit/unit_test.rb new file mode 100644 index 0000000..02f53bd --- /dev/null +++ b/test/unit/unit_test.rb @@ -0,0 +1,9 @@ +require File.expand_path('../../test_helper', __FILE__) + +class UnitTest < ActiveSupport::TestCase + + # Replace this with your real tests. + def test_truth + assert true + end +end