Created Unit model
command: rails generate redmine_plugin_model body_tracking unit name:string shortname:string type:integer
This commit is contained in:
parent
19e3d54297
commit
6b1bd9a45e
2
app/models/unit.rb
Normal file
2
app/models/unit.rb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
class Unit < ActiveRecord::Base
|
||||||
|
end
|
9
db/migrate/001_create_units.rb
Normal file
9
db/migrate/001_create_units.rb
Normal 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
9
test/unit/unit_test.rb
Normal 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
|
Reference in New Issue
Block a user