class Rails::Generators::AppBase
def imply_options(option_implications = OPTION_IMPLICATIONS, meta_options: [])
besides implying options such as --skip-asset-pipeline. (And so --api
In contrast, --api is not a meta option because it does other things
meta_options: [:minimal].
the implied --skip-active-job. This can be accomplished by passing
only --minimal is specified, --no-skip-active-storage should "undo"
specified, --no-skip-active-storage should raise an error. But, if
--skip-active-storage. If --skip-active-job is explicitly
--skip-active-storage. Also, --skip-active-job by itself implies
For example: --minimal implies both --skip-active-job and
transparently when revoking other options.
These options should have no other effects, and will be treated
A list of generator options which only serve to trigger other options.
[+:meta_options+]
==== Options
def imply_options(option_implications = OPTION_IMPLICATIONS, meta_options: []) option_reasons = {} option_implications.each do |reason, implications| implications.each do |implication| (option_reasons[implication.to_s] ||= []) << reason.to_s end end @implied_options = deduce_implied_options(options, option_reasons, meta_options.map(&:to_s)) @implied_options_conflicts = @implied_options.keys.select { |name| options[name] == false } self.options = options.merge(@implied_options.transform_values { true }).freeze end