mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
21 lines
458 B
Ruby
21 lines
458 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "models/book"
|
|
|
|
class EncryptedBook < ActiveRecord::Base
|
|
self.table_name = "books"
|
|
|
|
encrypts :name, deterministic: true
|
|
end
|
|
|
|
class EncryptedBookWithDowncaseName < ActiveRecord::Base
|
|
self.table_name = "books"
|
|
|
|
encrypts :name, deterministic: true, downcase: true
|
|
end
|
|
|
|
class EncryptedBookThatIgnoresCase < ActiveRecord::Base
|
|
self.table_name = "books"
|
|
|
|
encrypts :name, deterministic: true, ignore_case: true
|
|
end
|