Usar claves UUID en Active Record

Identifique y asocie sus modelos ActiveRecord utilizando UUID validados. gem ‘uuid’gem ‘activesupport’gem ‘activerecord’gem ‘sqlite3’require ‘active_support’require ‘active_record’require ‘uuid’ActiveRecord::Base.establish_connection adapter: “sqlite3”, database: “:memory:”;ActiveRecord::Schema.define do self.verbose = false create_table :posts, id: false, primary_key: …

Leer más