app/events/service_contracts/service_contract_created_event.rb
ServiceContracts::ServiceContractCreatedEvent#self.create is controlled by argument 'user' Open
Open
user: user || account.try!(:first_admin),
- Read upRead up
- Exclude checks
Control Parameter
is a special case of Control Couple
Example
A simple example would be the "quoted" parameter in the following method:
def write(quoted)
if quoted
write_quoted @value
else
write_unquoted @value
end
end
Fixing those problems is out of the scope of this document but an easy solution could be to remove the "write" method alltogether and to move the calls to "writequoted" / "writeunquoted" in the initial caller of "write".