From ee0d8ecb959108753972eb7553503a2791ea8d15 Mon Sep 17 00:00:00 2001 From: fanqiang <316257774@qq.com> Date: Thu, 1 Aug 2013 21:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E7=9A=84mo?= =?UTF-8?q?del=20tag.rb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/tag.rb | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 app/models/tag.rb diff --git a/app/models/tag.rb b/app/models/tag.rb deleted file mode 100644 index b6faeda5b..000000000 --- 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