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