lib/rails/generators/slim/component_generator.rb in actionview-component-1.16.0 vs lib/rails/generators/slim/component_generator.rb in actionview-component-1.17.0
- old
+ new
@@ -5,20 +5,14 @@
module Slim
module Generators
class ComponentGenerator < Erb::Generators::ComponentGenerator
source_root File.expand_path("templates", __dir__)
- class_option :require_content, type: :boolean, default: false
-
def copy_view_file
template "component.html.slim", File.join("app/components", class_path, "#{file_name}_component.html.slim")
end
private
-
- def requires_content?
- options["require_content"]
- end
def file_name
@_file_name ||= super.sub(/_component\z/i, "")
end
end