method

add_shared_options_for

Importance_0
add_shared_options_for(name) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/generators/app_base.rb, line 30
      def self.add_shared_options_for(name)
        class_option :name,                type: :string, aliases: "-n",
                                           desc: "Name of the app"

        class_option :template,            type: :string, aliases: "-m",
                                           desc: "Path to some #{name} template (can be a filesystem path or URL)"

        class_option :database,            type: :string, aliases: "-d", default: "sqlite3",
                                           desc: "Preconfigure for selected database (options: #{DATABASES.join('/')})"

        class_option :skip_git,            type: :boolean, aliases: "-G", default: nil,
                                           desc: "Skip git init, .gitignore and .gitattributes"

        class_option :skip_docker,         type: :boolean, default: nil,
                                           desc: "Skip Dockerfile, .dockerignore and bin/docker-entrypoint"

        class_option :skip_keeps,          type: :boolean, default: nil,
                                           desc: "Skip source control .keep files"

        class_option :skip_action_mailer,  type: :boolean, aliases: "-M",
                                           default: nil,
                                           desc: "Skip Action Mailer files"

        class_option :skip_action_mailbox, type: :boolean, default: nil,
                                           desc: "Skip Action Mailbox gem"

        class_option :skip_action_text,    type: :boolean, default: nil,
                                           desc: "Skip Action Text gem"

        class_option :skip_active_record,  type: :boolean, aliases: "-O", default: nil,
                                           desc: "Skip Active Record files"

        class_option :skip_active_job,     type: :boolean, default: nil,
                                           desc: "Skip Active Job"

        class_option :skip_active_storage, type: :boolean, default: nil,
                                           desc: "Skip Active Storage files"

        class_option :skip_action_cable,   type: :boolean, aliases: "-C", default: nil,
                                           desc: "Skip Action Cable files"

        class_option :skip_asset_pipeline, type: :boolean, aliases: "-A", default: nil

        class_option :asset_pipeline,      type: :string, aliases: "-a", default: "sprockets",
                                           desc: "Choose your asset pipeline [options: sprockets (default), propshaft]"

        class_option :skip_javascript,     type: :boolean, aliases: ["-J", "--skip-js"], default: (true if name == "plugin"),
                                           desc: "Skip JavaScript files"

        class_option :skip_hotwire,        type: :boolean, default: nil,
                                           desc: "Skip Hotwire integration"

        class_option :skip_jbuilder,       type: :boolean, default: nil,
                                           desc: "Skip jbuilder gem"

        class_option :skip_test,           type: :boolean, aliases: "-T", default: nil,
                                           desc: "Skip test files"

        class_option :skip_system_test,    type: :boolean, default: nil,
                                           desc: "Skip system test files"

        class_option :skip_bootsnap,       type: :boolean, default: nil,
                                           desc: "Skip bootsnap gem"

        class_option :skip_dev_gems,       type: :boolean, default: nil,
                                           desc: "Skip development gems (e.g., web-console)"

        class_option :dev,                 type: :boolean, default: nil,
                                           desc: "Set up the #{name} with Gemfile pointing to your Rails checkout"

        class_option :edge,                type: :boolean, default: nil,
                                           desc: "Set up the #{name} with a Gemfile pointing to the #{edge_branch} branch on the Rails repository"

        class_option :main,                type: :boolean, default: nil, aliases: "--master",
                                           desc: "Set up the #{name} with Gemfile pointing to Rails repository main branch"

        class_option :rc,                  type: :string, default: nil,
                                           desc: "Path to file containing extra configuration options for rails command"

        class_option :no_rc,               type: :boolean, default: nil,
                                           desc: "Skip loading of extra configuration options from .railsrc file"

        class_option :help,                type: :boolean, aliases: "-h", group: :rails,
                                           desc: "Show this help message and quit"
      end
Register or log in to add new notes.