Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Output a friendly message when no type given for GeneratedAttribute [#…

…5461 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit 233e0e8ce8a188d98a6bf87fae8caf5b708224b7 1 parent 5c06777
@rohit rohit authored josevalim committed
Showing with 1 addition and 0 deletions.
  1. +1 −0  railties/lib/rails/generators/generated_attribute.rb
View
1  railties/lib/rails/generators/generated_attribute.rb
@@ -6,6 +6,7 @@ class GeneratedAttribute
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
Please sign in to comment.
Something went wrong with that request. Please try again.