Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Ensure Foreigner is loaded for Rails 4.1.9

When using Foreigner on Rails 4.1.9 and trying to run `schema::load`
Foreigner has not been initialized yet so this methods don't exist.

This change was introduced by the following Rails commit:

* (rails/rails@5d6bb89)

So in order to ensure Foreigner has been initialized and methods are
present for `schema::load` to work correctly, we include `Foreigner.load`
inside the `schema.rb` file before any of the foreign key methods.

Also:

* Introduce Foreigner::Helper to store class level helpers
* Simplify the way to determine which version of ActiveRecord is using
latest commit f3a2627e21
Alvaro Fernando Lara guiman authored
..
Failed to load latest commit information.
foreigner Ensure Foreigner is loaded for Rails 4.1.9
foreigner.rb Ensure Foreigner is loaded for Rails 4.1.9
Something went wrong with that request. Please try again.