OSDN Git Service

ActiveLdap 1.2.4
[redminele/redminele.git] / ruby / lib / ruby / gems / 1.8 / gems / gettext_activerecord-2.1.0 / lib / gettext_activerecord / base.rb
diff --git a/ruby/lib/ruby/gems/1.8/gems/gettext_activerecord-2.1.0/lib/gettext_activerecord/base.rb b/ruby/lib/ruby/gems/1.8/gems/gettext_activerecord-2.1.0/lib/gettext_activerecord/base.rb
deleted file mode 100644 (file)
index e8507e0..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-=begin\r
-  lib/gettext_activerecord/base.rb - GetText for ActiveRecord::Base\r
-\r
-  Copyright (C) 2009  Masao Mutoh\r
-\r
-  You may redistribute it and/or modify it under the same\r
-  license terms as Ruby or LGPL.\r
-=end\r
-\r
-module ActiveRecord #:nodoc:\r
-  class Base\r
-    include GetText\r
-    include Validations\r
-\r
-    @@gettext_untranslate = Hash.new(false)\r
-    @@gettext_untranslate_columns = {}\r
-\r
-    class << self\r
-      # Untranslate all of the tablename/fieldnames in this model class.\r
-      #  (e.g.)\r
-      #  Person < ActiveRecord::Base\r
-      #    untranslate_all\r
-      #  end\r
-      def untranslate_all\r
-        @@gettext_untranslate[self] = true\r
-      end\r
-\r
-      # Returns true if "untranslate_all" is called. Otherwise false.\r
-      def untranslate_all?\r
-        @@gettext_untranslate[self]\r
-      end\r
-\r
-      # Sets the untranslate columns.\r
-      #  (e.g.) \r
-      #  Person < ActiveRecord::Base\r
-      #    untranslate :age, :address\r
-      #  end\r
-      def untranslate(*w)\r
-        ary = @@gettext_untranslate_columns[self] || []\r
-        ary += w.collect{|v| v.to_s}\r
-        @@gettext_untranslate_columns[self] = ary\r
-      end\r
-      \r
-      # Returns true if the column is set "untranslate".\r
-      #  (e.g.) untranslate? :foo\r
-      def untranslate?(columnname)\r
-        ary = @@gettext_untranslate_columns[self] || []\r
-        ary.include?(columnname)\r
-      end\r
-\r
-      def untranslate_data #:nodoc:\r
-        [@@gettext_untranslate[self], @@gettext_untranslate_columns[self] || []]\r
-      end\r
-\r
-      def columns_with_gettext_activerecord\r
-        unless defined? @columns\r
-          @columns = nil \r
-        end\r
-        unless @columns\r
-          @columns = columns_without_gettext_activerecord\r
-          @columns.each {|column| \r
-            column.table_class = self\r
-          }\r
-        end\r
-        @columns\r
-      end\r
-      alias_method_chain :columns, :gettext_activerecord\r
-    end\r
-  end\r
-\r
-end\r