diff --git a/bullet_train-super_scaffolding/lib/scaffolding/transformer.rb b/bullet_train-super_scaffolding/lib/scaffolding/transformer.rb index 93705a512..4d03862b6 100644 --- a/bullet_train-super_scaffolding/lib/scaffolding/transformer.rb +++ b/bullet_train-super_scaffolding/lib/scaffolding/transformer.rb @@ -1602,14 +1602,24 @@ def scaffold_crud(attributes) if top_level_model? icon_name = nil - if cli_options["sidebar"].present? - icon_name = cli_options["sidebar"] + if cli_options["navbar"].present? + icon_name = if cli_options["navbar"].match?(/^ti/) + "ti #{cli_options["navbar"]}" + elsif cli_options["navbar"].match?(/^fa/) + "fal #{cli_options["navbar"]}" + else + puts "" + puts "'#{cli_options["navbar"]}' is not a valid icon.".red + puts "Please refer to the Themify or Font Awesome documentation and pass the value like so:" + puts "--navbar=\"ti-world\"" + exit + end else puts "" # TODO: Update this help text letting developers know they can Super Scaffold # models without a parent after the `--skip-parent` logic is implemented. puts "Hey, models that are scoped directly off of a Team are eligible to be added to the navbar." - puts "Do you want to add this resource to the sidebar menu? (y/N)" + puts "Do you want to add this resource to the navbar menu? (y/N)" response = $stdin.gets.chomp if response.downcase[0] == "y" puts ""