diff --git a/app/models/tag.rb b/app/models/tag.rb deleted file mode 100644 index b6faeda5..00000000 --- a/app/models/tag.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Tag < ActiveRecord::Base - attr_accessible :content -#添加代码 - has_many :projects, :through => :project_tags - has_many :project_tags, :class_name => 'ProjectTags' - - #确定content不会被重复写入 - validates_uniqueness_of :content - validates_presence_of :content - - #添加tag内容 - def self.add_content(content) - @tag=Tag.new - @tag.content = content - @tag.save - true - end -end -#添加结束 \ No newline at end of file