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

[ci skip] Fully qualify attributes (we're in docs) and move them above the class so it's not confused with the belongs_to's

This commit is contained in:
Kasper Timm Hansen 2021-08-25 16:59:02 +02:00
parent 163466467e
commit 94e80269e3
No known key found for this signature in database
GPG key ID: 191153215EDA53D8

View file

@ -223,19 +223,19 @@ module ActionView
#
# Example object structure for use with this method:
#
# # attributes: id, name
# class Continent < ActiveRecord::Base
# has_many :countries
# # attribs: id, name
# end
#
# # attributes: id, name, continent_id
# class Country < ActiveRecord::Base
# belongs_to :continent
# # attribs: id, name, continent_id
# end
#
# # attributes: id, name, country_id
# class City < ActiveRecord::Base
# belongs_to :country
# # attribs: id, name, country_id
# end
#
# Sample usage: