Sha256: 13311e0cf04e11d028d5b532fefdfc8528ebb0d704bba6b450bc9dc4faaad578
Contents?: true
Size: 510 Bytes
Versions: 24
Compression:
Stored size: 510 Bytes
Contents
# frozen_string_literal: true require "rails/generators/erb/component_generator" module Haml module Generators class ComponentGenerator < Erb::Generators::ComponentGenerator source_root File.expand_path("templates", __dir__) def copy_view_file template "component.html.haml", File.join("app/components", class_path, "#{file_name}_component.html.haml") end private def file_name @_file_name ||= super.sub(/_component\z/i, "") end end end end
Version data entries
24 entries across 24 versions & 2 rubygems