lib/hanami/commands/generate/model.rb in hanami-0.8.0 vs lib/hanami/commands/generate/model.rb in hanami-0.9.0

- old
+ new

@@ -3,15 +3,16 @@ module Hanami module Commands class Generate class Model < Abstract - attr_reader :model_name + attr_reader :input, :model_name def initialize(options, model_name) super(options) - @model_name = Utils::String.new(model_name).classify + @input = Utils::String.new(model_name).underscore + @model_name = Utils::String.new(@input).classify assert_model_name! end def map_templates @@ -86,10 +87,10 @@ end # @since 0.5.0 # @api private def model_name_underscored - Utils::String.new(model_name).underscore + input end # @since 0.8.0 # @api private def project_name