Sha256: f1ae6ce96586a610d7e1a6a8fd3f84e09cc69990bf04449da8217d56ef625b69
Contents?: true
Size: 678 Bytes
Versions: 8
Compression:
Stored size: 678 Bytes
Contents
module StrongMigrations module Migration def migrate(direction) strong_migrations_checker.direction = direction super end def method_missing(method, *args) strong_migrations_checker.perform(method, *args) do super end end def safety_assured strong_migrations_checker.safety_assured do yield end end def stop!(message, header: "Custom check") raise StrongMigrations::UnsafeMigration, "\n=== #{header} #strong_migrations ===\n\n#{message}\n" end private def strong_migrations_checker @strong_migrations_checker ||= StrongMigrations::Checker.new(self) end end end
Version data entries
8 entries across 8 versions & 1 rubygems