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:
commit
d4d560bc4b
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue