class Erb::Generators::ComponentGenerator
Public Instance Methods
copy_view_file()
click to toggle source
# File lib/rails/generators/erb/component_generator.rb, line 12 def copy_view_file unless options["inline"] template "component.html.erb", destination end end
Private Instance Methods
destination()
click to toggle source
# File lib/rails/generators/erb/component_generator.rb, line 20 def destination if options["sidecar"] File.join("app/components", class_path, "#{file_name}", "#{file_name}.html.erb") else File.join("app/components", class_path, "#{file_name}.html.erb") end end