instance method current_migration_number

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

current_migration_number()

No documentation comment.

Source
# File railties/lib/rails_generator/commands.rb, line 60
          def current_migration_number
            Dir.glob("#{RAILS_ROOT}/#{@migration_directory}/[0-9]*_*.rb").inject(0) do |max, file_path|
              n = File.basename(file_path).split('_', 2).first.to_i
              if n > max then n else max end
            end
          end

Defined in railties/lib/rails_generator/commands.rb line 60 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Generator::Commands::Base

Type at least 2 characters to search.

↑↓ navigate · open · esc close