diff options
Diffstat (limited to 'railties/lib/rails_generator/base.rb')
-rw-r--r-- | railties/lib/rails_generator/base.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/lib/rails_generator/base.rb b/railties/lib/rails_generator/base.rb index 6a56f96b1c..f8da8ad032 100644 --- a/railties/lib/rails_generator/base.rb +++ b/railties/lib/rails_generator/base.rb @@ -1,6 +1,7 @@ require File.dirname(__FILE__) + '/options' require File.dirname(__FILE__) + '/manifest' require File.dirname(__FILE__) + '/spec' +require File.dirname(__FILE__) + '/generated_attribute' # Rails::Generator is a code generation platform tailored for the Rails # web application framework. Generators are easily invoked within Rails @@ -165,6 +166,13 @@ module Rails def banner "Usage: #{$0} #{spec.name} #{spec.name.camelize}Name [options]" end + + def attributes + @attributes ||= @args.collect do |attribute| + Rails::Generator::GeneratedAttribute.new(*attribute.split(":")) + end + end + private def assign_names!(name) |