Sha256: 3016e43d922755f22a56b9c76ec02abcc2aed4931d968e8e0951c257714d113c
Contents?: true
Size: 510 Bytes
Versions: 24
Compression:
Stored size: 510 Bytes
Contents
# frozen_string_literal: true require "rails/generators/erb/component_generator" module Slim module Generators class ComponentGenerator < Erb::Generators::ComponentGenerator source_root File.expand_path("templates", __dir__) def copy_view_file template "component.html.slim", File.join("app/components", class_path, "#{file_name}_component.html.slim") 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