Sha256: 08047e8b0a39b87a401ae928722b05ed5d34b0bc62e2b8548bc7b89746e229cc

Contents?: true

Size: 290 Bytes

Versions: 10

Compression:

Stored size: 290 Bytes

Contents

module Tenon
  module CanBeForeign
    def self.included(mod)
      mod.extend(ClassMethods)
    end

    module ClassMethods
      def foreign_fields
        Tenon::I18nLookup.fields[to_s.downcase.to_sym]
      end
    end
  end
end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tenon-2.1.0 lib/tenon/can_be_foreign.rb
tenon-2.0.8 lib/tenon/can_be_foreign.rb
tenon-2.0.7 lib/tenon/can_be_foreign.rb
tenon-2.0.6 lib/tenon/can_be_foreign.rb
tenon-2.0.5 lib/tenon/can_be_foreign.rb
tenon-2.0.4 lib/tenon/can_be_foreign.rb
tenon-2.0.3 lib/tenon/can_be_foreign.rb
tenon-2.0.2 lib/tenon/can_be_foreign.rb
tenon-2.0.1 lib/tenon/can_be_foreign.rb
tenon-2.0.0 lib/tenon/can_be_foreign.rb