Layer on top a more pleasant API for the default case

This commit is contained in:
David Heinemeier Hansson committed 2025-12-01 15:23:23 +01:00
1 parent 32be03a240
commit d3b6507ce2
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -2,5 +2,5 @@ class Account < ApplicationRecord
include Joinable
has_one_attached :logo
has_json settings: { restrict_room_creation_to_administrators: :boolean }, delegate: true
has_settings restrict_room_creation_to_administrators: :boolean, max_invites: 10, name: "hero"
end
+4
View File
@@ -45,6 +45,10 @@ module ActiveRecord
end if delegate
end
end
def has_settings(schema)
has_json settings: schema, delegate: true
end
end
end
end