lib/annotate/annotate_models.rb in annotate-3.1.0 vs lib/annotate/annotate_models.rb in annotate-3.1.1
- old
+ new
@@ -36,11 +36,11 @@
# Machinist http://github.com/notahat/machinist
BLUEPRINTS_TEST_DIR = File.join('test', "blueprints")
BLUEPRINTS_SPEC_DIR = File.join('spec', "blueprints")
- # Factory Girl https://github.com/thoughtbot/factory_bot
+ # Factory Bot https://github.com/thoughtbot/factory_bot
FACTORY_BOT_TEST_DIR = File.join('test', "factories")
FACTORY_BOT_SPEC_DIR = File.join('spec', "factories")
# Fabrication https://github.com/paulelliott/fabrication.git
FABRICATORS_TEST_DIR = File.join('test', "fabricators")
@@ -211,10 +211,10 @@
value.inspect
end
end
def schema_default(klass, column)
- quote(klass.columns.find { |x| x.name.to_s == column.name.to_s }.try(:default))
+ quote(klass.column_defaults[column.name])
end
def retrieve_indexes_from_table(klass)
table_name = klass.table_name
return [] unless table_name