We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 471c9c7 commit 694fb6bCopy full SHA for 694fb6b
lib/rails/concerns/helpers.rb
@@ -2,6 +2,8 @@ module Rails
2
module Concerns
3
module Helpers
4
def require_column base, column_name
5
+ return if ActiveRecord::Migrator.needs_migration?
6
+
7
if base.table_exists? and base.columns.map(&:name).exclude?(column_name)
8
raise NotImplementedError, "#{base} must have '#{column_name}' column"
9
end
0 commit comments