Sha256: 3b8ab1549d29b8e4cd34b0febb1fe6d66b5193adeccba47e8bbcd0fbfc77b1fe

Contents?: true

Size: 572 Bytes

Versions: 2

Compression:

Stored size: 572 Bytes

Contents

require 'rails/railtie'

module PapersPlease
  class Railtie < ::Rails::Railtie
    rake_tasks do
      Dir[File.join(File.dirname(__FILE__), 'tasks', '*.rake')].each { |f| load f }
    end

    initializer :papers_plesae do
      if defined? ActionController::Base
        ActionController::Base.class_eval do
          include PapersPlease::Rails::ControllerMethods
        end
      end

      if defined? ActionController::API
        ActionController::API.class_eval do
          include PapersPlease::Rails::ControllerMethods
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
papers_please-0.1.4 lib/papers_please/railtie.rb
papers_please-0.1.3 lib/papers_please/railtie.rb