diff options
-rw-r--r-- | railties/lib/rails/generators/generated_attribute.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/generated_attribute.rb b/railties/lib/rails/generators/generated_attribute.rb index 3b9fff2f4a..64273e4ca4 100644 --- a/railties/lib/rails/generators/generated_attribute.rb +++ b/railties/lib/rails/generators/generated_attribute.rb @@ -6,6 +6,7 @@ module Rails attr_accessor :name, :type def initialize(name, type) + raise Thor::Error, "Missing type for attribute '#{name}'.\nExample: '#{name}:string' where string is the type." if type.blank? @name, @type = name, type.to_sym end |