Method: Rails::Generators::Db::System::ChangeGenerator#initialize
- Defined in:
- railties/lib/rails/generators/rails/db/system/change/change_generator.rb
#initialize ⇒ ChangeGenerator
Returns a new instance of ChangeGenerator.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'railties/lib/rails/generators/rails/db/system/change/change_generator.rb', line 25 def initialize(*) super unless Database::DATABASES.include?([:to]) raise Error, "Invalid value for --to option. Supported preconfigurations are: #{Database::DATABASES.join(", ")}." end opt = .dup opt[:database] ||= opt[:to] self. = opt.freeze end |