Refactor code to solve the 'Line is too long' error in rubocop Method.create(domain_id: domain.id, type_notification: type, message: title, url: url, owner_id: self.user.id)


How can I reduce this line to 80 ?
I'd just write the call with one line per key/value:

Method.create(
  domain_id: domain.id, 
  type_notification: type, 
  message: title, 
  url: url, 
  owner_id: user.id
)


Note that the explicit reference to self in method calls is not idiomatic (check the unofficial Ruby style guide for this and other useful tips).

Also, since Method is a class name already in the core, is not a good idea to have a model what that name.