Skip to content

Instantly share code, notes, and snippets.

@glennfu
Created April 9, 2020 15:17
Show Gist options
  • Save glennfu/b2006b002b27ea8dca4444f208ec298d to your computer and use it in GitHub Desktop.
Save glennfu/b2006b002b27ea8dca4444f208ec298d to your computer and use it in GitHub Desktop.
Version4::Foo.last.bars.first.class
=> Version4::Bar
Version5::Foo.last.bars.first.class
=> Version4::Bar
class Version4::Bar < ApplicationRecord
end
class Version4::Foo < ApplicationRecord
has_many :bars
end
class Version5::Bar < Version4::Bar
end
class Version5::Foo < Version4::Foo
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment