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
102102 # You create a new record that uses delegated typing by creating the delegator and delegatee at the same time,
103103 # like so:
104104 #
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
106106 #
107107 # If you need more complicated composition, or you need to perform dependent validation, you should build a factory
108108 # method or class to take care of the complicated needs. This could be as simple as:
109109 #
110110 # 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
113113 # end
114114 # end
115115 #
You can’t perform that action at this time.
0 commit comments