aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/generators
diff options
context:
space:
mode:
authorSzymon Nowak <szimek@gmail.com>2010-01-30 17:38:42 +0100
committerJosé Valim <jose.valim@gmail.com>2010-02-02 10:18:48 +0100
commit17bee0dd2fcce2d040bd6edda3e19cb11c5813d9 (patch)
tree64c3f843115a5d118ac00374c859f7bcd2d240aa /activerecord/lib/generators
parentc01014ac1c98a05fe68e652f978dfa9d43f0fc2b (diff)
downloadrails-17bee0dd2fcce2d040bd6edda3e19cb11c5813d9.tar.gz
rails-17bee0dd2fcce2d040bd6edda3e19cb11c5813d9.tar.bz2
rails-17bee0dd2fcce2d040bd6edda3e19cb11c5813d9.zip
Change Rails::Generators::Migration protected instance methods to class methods. [#3820 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/generators')
-rw-r--r--activerecord/lib/generators/active_record.rb17
1 files changed, 8 insertions, 9 deletions
diff --git a/activerecord/lib/generators/active_record.rb b/activerecord/lib/generators/active_record.rb
index 25b982f296..1ca838b4f2 100644
--- a/activerecord/lib/generators/active_record.rb
+++ b/activerecord/lib/generators/active_record.rb
@@ -16,16 +16,15 @@ module ActiveRecord
end
end
- protected
- # Implement the required interface for Rails::Generators::Migration.
- #
- def next_migration_number(dirname) #:nodoc:
- if ActiveRecord::Base.timestamped_migrations
- Time.now.utc.strftime("%Y%m%d%H%M%S")
- else
- "%.3d" % (current_migration_number(dirname) + 1)
- end
+ # Implement the required interface for Rails::Generators::Migration.
+ #
+ def self.next_migration_number(dirname) #:nodoc:
+ if ActiveRecord::Base.timestamped_migrations
+ Time.now.utc.strftime("%Y%m%d%H%M%S")
+ else
+ "%.3d" % (current_migration_number(dirname) + 1)
end
+ end
end
end
end