Class: ActiveRecord::Base

### Home Classes Methods

### In Files

- lib/gettext_activerecord/base.rb

### Parent

Object

### Methods

- ::columns_with_gettext_activerecord
- ::untranslate
- ::untranslate?
- ::untranslate_all
- ::untranslate_all?

### Included Modules

- GetText

### Class/Module Index

Quicksearch

- ActiveRecord
- ActiveRecord::Base
- ActiveRecord::ConnectionAdapters
- ActiveRecord::ConnectionAdapters::Column
- ActiveRecord::Migration
- GetText
- GetText::ActiveRecordParser
- Class
- GetTextActiveRecord
- Object

No matching classes.

# ActiveRecord::Base

### Public Class Methods

columns_with_gettext_activerecord() click to toggle source

    # File lib/gettext_activerecord/base.rb, line 55
    def columns_with_gettext_activerecord
      unless defined? @columns
        @columns = nil
      end
      unless @columns
        @columns = columns_without_gettext_activerecord
        @columns.each {|column|
          column.table_class = self
        }
      end
      @columns
    end

untranslate(*w) click to toggle source

Sets the untranslate columns.

    (e.g.)
    Person < ActiveRecord::Base
      untranslate :age, :address
    end

    # File lib/gettext_activerecord/base.rb, line 38
    def untranslate(*w)
      ary = @@gettext_untranslate_columns[self] || []
      ary += w.collect{|v| v.to_s}
      @@gettext_untranslate_columns[self] = ary
    end

untranslate?(columnname) click to toggle source

Returns true if the column is set "untranslate".

    (e.g.) untranslate? :foo

    # File lib/gettext_activerecord/base.rb, line 46
    def untranslate?(columnname)
      ary = @@gettext_untranslate_columns[self] || []
      ary.include?(columnname)
    end

untranslate_all() click to toggle source

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
    def untranslate_all
      @@gettext_untranslate[self] = true
    end

untranslate_all?() click to toggle source

Returns true if "untranslate_all" is called. Otherwise false.

    # File lib/gettext_activerecord/base.rb, line 29
    def untranslate_all?
      @@gettext_untranslate[self]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.