module FilepickerRails
  # @private
  class Engine < ::Rails::Engine
    config.filepicker_rails = FilepickerRails::Configuration.new
    isolate_namespace FilepickerRails

    initializer "filepicker_rails.form_builder" do
      ActionView::Helpers::FormBuilder.send(:include, FilepickerRails::FormHelper)
    end

    initializer 'filepicker_rails.action_controller' do |app|
      ActiveSupport.on_load(:action_controller) do
        helper FilepickerRails::ApplicationHelper
      end
    end
  end
end

module FilepickerRails
  # @private
  class Engine < ::Rails::Engine
    config.filepicker_rails = FilepickerRails::Configuration.new
    isolate_namespace FilepickerRails

    initializer "filepicker_rails.form_builder" do
      ActionView::Helpers::FormBuilder.send(:include, FilepickerRails::FormHelper)
    end

    initializer 'filepicker_rails.action_controller' do |app|
      ActiveSupport.on_load(:action_controller) do
        ::ActionController::Base.helper(FilepickerRails::ApplicationHelper)
      end
    end
  end
end

Fix helper inclusion for Rails 5
Fix helper inclusion for Rails 5

Calling the `helper` method after upgrading to Rails 5 resulted in the
following error:

undefined method 'helper' for ActionController::API:Class

This commit follows the lead of the following commit on another project:
https://github.com/weppos/breadcrumbs_on_rails/commit/3a3ac0c0d42bb0535418942e9051d687661582e5
