lib/hanami/cli_sub_commands/generate.rb in hanami-0.9.2 vs lib/hanami/cli_sub_commands/generate.rb in hanami-1.0.0.beta1

- old
+ new

@@ -38,11 +38,11 @@ method_option :skip_view, desc: 'Skip the generation of the view. Also skips template generation.', default: false, type: :boolean method_option :template, desc: 'Extension to be used for the generated template. Default is defined through your .hanamirc file.' def actions(application_name = nil, controller_and_action_name) if Hanami::Environment.new(options).container? && application_name.nil? msg = "ERROR: \"hanami generate action\" was called with arguments [\"#{controller_and_action_name}\"]\n" \ - "Usage: \"hanami action APPLICATION_NAME CONTROLLER_NAME#ACTION_NAME\"" + "Usage: \"hanami generate action APPLICATION_NAME CONTROLLER_NAME#ACTION_NAME\"" fail Error, msg end if options[:help] invoke :help, ['action'] @@ -75,9 +75,10 @@ > $ hanami generate model car > $ hanami generate model vehicles/car EOS method_option :test, desc: 'Defines the testing Framework to be used. Default is defined through your .hanamirc file.' + method_option :skip_migration, desc: 'Skips the generation of a migration to create the model\'s table', default: false, type: :boolean def model(name) if options[:help] invoke :help, ['model'] else require 'hanami/commands/generate/model'