资源库专业分类model创建

This commit is contained in:
huang 2016-12-01 15:57:42 +08:00
parent 97e9da652b
commit 9ee36f05bc
4 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,3 @@
class ProfessionalLevel < ActiveRecord::Base
attr_accessible :level
end

View File

@ -0,0 +1,9 @@
class CreateProfessionalLevels < ActiveRecord::Migration
def change
create_table :professional_levels do |t|
t.string :level
t.timestamps
end
end
end

View File

@ -0,0 +1,6 @@
FactoryGirl.define do
factory :professional_level do
level "MyString"
end
end

View File

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe ProfessionalLevel, :type => :model do
pending "add some examples to (or delete) #{__FILE__}"
end