Sha256: d30ced4f5d055782412fd6835c3a2203abb6bc524746b9e34f244724eb3d7431

Contents?: true

Size: 557 Bytes

Versions: 1

Compression:

Stored size: 557 Bytes

Contents

require 'transponder/version'
require 'transponder/transmission'
require 'rails'

module Transponder
  module ViewHelpers
    def xms_module_name
      params[:controller].include?('/') ? params[:controller].split('/')[0] : nil
    end

    def xms_event(module_name: nil, action: nil)
      _module = module_name || xms_module_name || 'application'
      _action = action || action_name
      "ujs:#{_module}:#{controller_name}:#{_action}"
    end
  end

  class Engine < ::Rails::Engine

  end
end
ActionView::Base.send :include, Transponder::ViewHelpers

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
transponder-0.8.2 lib/transponder.rb