资源库专业分类model创建
This commit is contained in:
parent
97e9da652b
commit
9ee36f05bc
|
@ -0,0 +1,3 @@
|
||||||
|
class ProfessionalLevel < ActiveRecord::Base
|
||||||
|
attr_accessible :level
|
||||||
|
end
|
|
@ -0,0 +1,9 @@
|
||||||
|
class CreateProfessionalLevels < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :professional_levels do |t|
|
||||||
|
t.string :level
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,6 @@
|
||||||
|
FactoryGirl.define do
|
||||||
|
factory :professional_level do
|
||||||
|
level "MyString"
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe ProfessionalLevel, :type => :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
Loading…
Reference in New Issue