Sha256: b29aebfa6636543f1de8fe7b98335acd2fabd379fcf44e5d4b7162039612e81d

Contents?: true

Size: 328 Bytes

Versions: 6

Compression:

Stored size: 328 Bytes

Contents

module Ninsho
  # Responsible for loading and mounting the Ninsho::Interface method on
  # ActiveRecord, which allows it to add the belongs_to_ninsho method
  # inside models
  class Railtie < Rails::Railtie
    ActiveSupport.on_load :active_record do
      ActiveRecord::Base.send :include, Ninsho::Interface
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ninsho-0.1.3 lib/ninsho/railtie.rb
ninsho-0.1.2 lib/ninsho/railtie.rb
ninsho-0.1.1 lib/ninsho/railtie.rb
ninsho-0.1.0 lib/ninsho/railtie.rb
ninsho-0.0.3 lib/ninsho/railtie.rb
ninsho-0.0.2 lib/ninsho/railtie.rb