require "angularjs-rails/version"

module AngularJS
  module Rails
    if defined? Rails::Engine
      require "angularjs-rails/engine"
    elsif defined? Sprockets
      require "angularjs-rails/sprockets"
    end
  end
end
require "angularjs-rails/version"

module AngularJS
  module Rails
    if defined? ::Rails::Engine
      require "angularjs-rails/engine"
    elsif defined? Sprockets
      require "angularjs-rails/sprockets"
    end
  end
end

Fix detection of Rails::Engine for Rails 4
Fix detection of Rails::Engine for Rails 4

There was code saying if defined?(Rails::Engine), but that didn't work on our Rails 4 project.
It seems to work better as defined(::Rails::Engine).
