Permalink
Browse files

Merge pull request #27763 from y-yagi/move_db_migrate_path_to_migrati…

…on_module

move `db_migrate_path` method to `Migration` module
  • Loading branch information...
eileencodes committed Jan 22, 2017
2 parents 732ca82 + b8c34d1 commit 20107ff6c80a7e162adf22176eee811a59498126
@@ -20,6 +20,14 @@ def primary_key_type
key_type = options[:primary_key_type]
", id: :#{key_type}" if key_type
end
def db_migrate_path
if defined?(Rails) && Rails.application
Rails.application.config.paths["db/migrate"].to_ary.first
else
"db/migrate"
end
end
end
end
end
@@ -71,14 +71,6 @@ def validate_file_name!
def normalize_table_name(_table_name)
pluralize_table_names? ? _table_name.pluralize : _table_name.singularize
end
def db_migrate_path
if defined?(Rails) && Rails.application
Rails.application.config.paths["db/migrate"].to_ary.first
else
"db/migrate"
end
end
end
end
end
@@ -64,14 +64,6 @@ def application_record_file_name
"app/models/application_record.rb"
end
end
def db_migrate_path
if defined?(Rails) && Rails.application
Rails.application.config.paths["db/migrate"].to_ary.first
else
"db/migrate"
end
end
end
end
end

0 comments on commit 20107ff

Please sign in to comment.