OSDN Git Service

unuse activerecord
[tdcgexplorer/nimono.git] / app / models / record / thumb.rb
diff --git a/app/models/record/thumb.rb b/app/models/record/thumb.rb
deleted file mode 100644 (file)
index e460363..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-class Record::Thumb < ActiveRecord::Base
-  set_primary_key :video_id
-  has_many :arc_thumbs
-  has_many :arcs, :through => :arc_thumbs
-
-  class Search
-    attr_accessor :text
-
-    def initialize(attributes)
-      attributes.each do |name, value|
-        send("#{name}=", value)
-      end if attributes
-    end
-
-    def conditions
-      @conditions ||= begin
-        sql = "TRUE"
-        ret = [ sql ]
-        terms = []
-        unless text.blank?
-          sql.concat " and (title like ? or description like ?)"
-          ret.push "%#{text}%"
-          ret.push "%#{text}%"
-        end
-        ret
-      end
-    end
-
-    def find_options
-      { :conditions => conditions }
-    end
-  end
-end