/create_key.rb Secret
Created
February 18, 2022 00:16
Changing a polymorphic_type in Rails - create_key.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new_key = Key.create(vehicle: Car.new) | |
new_key | |
=> Key | |
vehicle_type: "Car", | |
vehicle_id: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment