
Untitled
By: a guest on
May 31st, 2012 | syntax:
None | size: 0.47 KB | hits: 11 | expires: Never
How do I get a rails template to add additional attributes on migration columns?
generate(:scaffold, "Thing title:string")
Rails-3.1.0
Ruby-1.9.2-p290
$ rails generate model --help
Usage:
rails generate model NAME [field:type field:type] [options]
[...]
def generate(what, *args)
log :generate, what
argument = args.map {|arg| arg.to_s }.flatten.join(" ")
in_root { run_ruby_script("script/rails generate #{what} #{argument}", :verbose => false) }
end