Sha256: e73e8b09e695795d31717e3c2d3737b28dc5cd1c06f175240e0506f0613fbd90

Contents?: true

Size: 421 Bytes

Versions: 1

Compression:

Stored size: 421 Bytes

Contents

module Buildybuild
  class ActiveLinkGenerator < Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)
    def add_active_link_helper
      insert_into_file(
        "app/helpers/application_helper.rb",
        helper_method, before: /^end\n*$/
      )
    end

    private

    def helper_method
      File.read(File.join(self.class.source_root, "active_link_helper.rb"))
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
buildybuild-1.1.0 lib/generators/buildybuild/active_link/active_link_generator.rb