Sha256: 0416dbd18ccbc6c1aea8c44a72afe9ea0f87e1355ab08fa409aa605db65e51f8

Contents?: true

Size: 915 Bytes

Versions: 35

Compression:

Stored size: 915 Bytes

Contents

require 'active_tools/action_pack/action_controller/path_helper/complex_helpers'
require 'active_tools/action_pack/action_controller/path_helper/http_referer'

module ActiveTools
  module ActionPack
    module ActionController
      module PathHelper
        extend ::ActiveSupport::Concern
        
        included do
          include ComplexHelpers
          helper_method :path?, :action?, :controller?, :current_action, :current_controller, :http_referer
        end
        
        def current_action
          request.path_parameters[:action]
        end

        def current_controller
          request.path_parameters[:controller]
        end
        
        def http_referer(environment = {})
          @http_referer ||= HttpReferer.new(request, environment)
        end
        
      end
    end
  end
  
  module OnLoadActionController
    include ActionPack::ActionController::PathHelper
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
active_tools-0.0.52 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.51 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.50 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.42 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.41 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.40 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.39 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.38 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.37 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.36 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.35 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.34 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.33 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.32 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.31 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.30 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.29 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.28 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.27 lib/active_tools/action_pack/action_controller/path_helper.rb
active_tools-0.0.26 lib/active_tools/action_pack/action_controller/path_helper.rb