提交 1c07a323 编写于 作者: A aditya-kapoor

Using ActiveSupport::Concern instead of plain regular Ruby hooks in...

Using ActiveSupport::Concern instead of plain regular Ruby hooks in railties/lib/rails/generators/migration.rb file
上级 6c82844f
require 'active_support/concern'
module Rails
module Generators
# Holds common methods for migrations. It assumes that migrations has the
# [0-9]*_name format and can be used by another frameworks (like Sequel)
# just by implementing the next migration version method.
module Migration
extend ActiveSupport::Concern
attr_reader :migration_number, :migration_file_name, :migration_class_name
def self.included(base) #:nodoc:
base.extend ClassMethods
end
module ClassMethods
def migration_lookup_at(dirname) #:nodoc:
Dir.glob("#{dirname}/[0-9]*_*.rb")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册