1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #42018 from benoror/patch-2

[ci skip] Enhance delegated types example & schema
This commit is contained in:
Zachary Scott 2021-06-23 19:15:05 +09:00 committed by GitHub
commit d4d560bc4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,10 +51,9 @@ module ActiveRecord
# end
# end
#
# # Schema: messages[ id, subject ]
# # Schema: messages[ id, subject, body ]
# class Message < ApplicationRecord
# include Entryable
# has_rich_text :content
# end
#
# # Schema: comments[ id, content ]
@ -76,7 +75,9 @@ module ActiveRecord
#
# # entries/entryables/_message.html.erb
# <div class="message">
# Posted on <%= entry.created_at %> by <%= entry.creator.name %>: <%= entry.message.content %>
# <div class="subject"><%= entry.message.subject %></div>
# <p><%= entry.message.body %></p>
# <i>Posted on <%= entry.created_at %> by <%= entry.creator.name %></i>
# </div>
#
# # entries/entryables/_comment.html.erb