Sha256: 68e7a5df57a380914a84532ee312cff24070901fb94b0df70530506e81ab6121

Contents?: true

Size: 291 Bytes

Versions: 24

Compression:

Stored size: 291 Bytes

Contents

module Forge
  module CanBeForeign
    def self.included(mod)
      mod.extend(ClassMethods)
    end
    
    module ClassMethods
      def foreign_fields
        Forge::I18nFields[self.to_s.downcase.to_sym]
      end
    end
  end
end

ActiveRecord::Base.send(:include, Forge::CanBeForeign)

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.1.9 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.1.8 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.1.7 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.1.6 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.1.5 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.1.4 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.1.3 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.1.2 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.1.1 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.1.0 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.0.18 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.0.17 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.0.16 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.0.15 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.0.14 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.0.13 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.0.12 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.0.11 lib/forge/lib/forge/can_be_foreign.rb
forge-cli-0.0.10 lib/forge/config/initializers/can_be_foreign.rb