Sha256: 0559b540b32c0b62209bfaa1eea1e46bdef21ae397bd859bdb39d5466a65f298

Contents?: true

Size: 427 Bytes

Versions: 4

Compression:

Stored size: 427 Bytes

Contents

module Initjs
  module Helper
    def initjs_tag
      content_tag 'div', '', { :id => "init-js",
                                :"data-controller-class" => controller.class.name,
                                :"data-controller-name" => controller.controller_name.camelize,
                                :"data-action" => controller.action_name.camelize }
    end
  end
end

ActionView::Base.send :include, Initjs::Helper

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
initjs-0.1.3 lib/initjs/helper.rb
initjs-0.1.2 lib/initjs/helper.rb
initjs-0.1.1 lib/initjs/helper.rb
initjs-0.1.0 lib/initjs/helper.rb