Skip to content
Browse files

Using ActiveSupport::Concern instead of plain regular Ruby hooks in r…

…ailties/lib/rails/generators/migration.rb file
  • Loading branch information...
1 parent 6c82844 commit 1c07a3231de3540a1aef4f1f8f7ef22d02b6a936 @aditya-kapoor aditya-kapoor committed Jul 1, 2013
Showing with 3 additions and 4 deletions.
  1. +3 −4 railties/lib/rails/generators/migration.rb
View
7 railties/lib/rails/generators/migration.rb
@@ -1,15 +1,14 @@
+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")

0 comments on commit 1c07a32

Please sign in to comment.
Something went wrong with that request. Please try again.