mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] Enhance delegated types example & schema
Adding a bit more context to the documented examples & schema
This commit is contained in:
parent
2e14c53fc6
commit
85a2e5fdcc
1 changed files with 4 additions and 3 deletions
|
@ -51,10 +51,9 @@ module ActiveRecord
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# # Schema: messages[ id, subject ]
|
# # Schema: messages[ id, subject, body ]
|
||||||
# class Message < ApplicationRecord
|
# class Message < ApplicationRecord
|
||||||
# include Entryable
|
# include Entryable
|
||||||
# has_rich_text :content
|
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# # Schema: comments[ id, content ]
|
# # Schema: comments[ id, content ]
|
||||||
|
@ -76,7 +75,9 @@ module ActiveRecord
|
||||||
#
|
#
|
||||||
# # entries/entryables/_message.html.erb
|
# # entries/entryables/_message.html.erb
|
||||||
# <div class="message">
|
# <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>
|
# </div>
|
||||||
#
|
#
|
||||||
# # entries/entryables/_comment.html.erb
|
# # entries/entryables/_comment.html.erb
|
||||||
|
|
Loading…
Reference in a new issue