File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
activerecord/lib/active_record Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -102,14 +102,14 @@ module ActiveRecord
102
102
# You create a new record that uses delegated typing by creating the delegator and delegatee at the same time,
103
103
# like so:
104
104
#
105
- # Entry.create! entryable: Comment.new(content: "Hello!"), creator: Current.user
105
+ # Entry.create! entryable: Comment.new(content: "Hello!"), creator: Current.user, account: Current.account
106
106
#
107
107
# If you need more complicated composition, or you need to perform dependent validation, you should build a factory
108
108
# method or class to take care of the complicated needs. This could be as simple as:
109
109
#
110
110
# class Entry < ApplicationRecord
111
- # def self.create_with_comment(content, creator: Current.user)
112
- # create! entryable: Comment.new(content: content), creator: creator
111
+ # def self.create_with_comment(content, creator: Current.user, account: Current.account )
112
+ # create! entryable: Comment.new(content: content), creator: creator, account: account
113
113
# end
114
114
# end
115
115
#
You can’t perform that action at this time.
0 commit comments