# File lib/gettext_activerecord/base.rb, line 55
55: def columns_with_gettext_activerecord
56: unless defined? @columns
57: @columns = nil
58: end
59: unless @columns
60: @columns = columns_without_gettext_activerecord
61: @columns.each {|column|
62: column.table_class = self
63: }
64: end
65: @columns
66: end
Sets the untranslate columns.
(e.g.) Person < ActiveRecord::Base untranslate :age, :address end
# File lib/gettext_activerecord/base.rb, line 38
38: def untranslate(*w)
39: ary = @@gettext_untranslate_columns[self] || []
40: ary += w.collect{|v| v.to_s}
41: @@gettext_untranslate_columns[self] = ary
42: end
Returns true if the column is set “untranslate”.
(e.g.) untranslate? :foo
# File lib/gettext_activerecord/base.rb, line 46
46: def untranslate?(columnname)
47: ary = @@gettext_untranslate_columns[self] || []
48: ary.include?(columnname)
49: end
Untranslate all of the tablename/fieldnames in this model class.
(e.g.) Person < ActiveRecord::Base untranslate_all end
# File lib/gettext_activerecord/base.rb, line 24
24: def untranslate_all
25: @@gettext_untranslate[self] = true
26: end
Returns true if “untranslate_all“ is called. Otherwise false.
# File lib/gettext_activerecord/base.rb, line 29
29: def untranslate_all?
30: @@gettext_untranslate[self]
31: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.