1
0

Created Unit model

command: rails generate redmine_plugin_model body_tracking unit
name:string shortname:string type:integer
This commit is contained in:
cryptogopher 2019-08-08 21:46:26 +02:00
parent 19e3d54297
commit 6b1bd9a45e
3 changed files with 20 additions and 0 deletions

2
app/models/unit.rb Normal file
View File

@ -0,0 +1,2 @@
class Unit < ActiveRecord::Base
end

View File

@ -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

9
test/unit/unit_test.rb Normal file
View File

@ -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