Commit Graph

4 Commits

Author SHA1 Message Date
Javi Martín
38b7307450 Use respond_to? instead of try
Usually when we use `try` we actually mean `try!`, which is the same as
the safe navigation operator. However, there are a few cases where we
actually mean to execute a method if the object responds to that method.

In those cases using `try` would actually be OK, but in order to avoid
confusion as to whether we mean to check for `respond_to?` or we mean to
use safe navigation, I'm removing all usages of `try`.
2019-10-22 17:37:51 +02:00
Senén Rodero Rodríguez
ce7be5f2d6 Change the way to retrieve notifiable body
Using 'try' method to get notifiable is not working with translations
anymore. It was returning 'nil' always even when body translation is
populated.
2019-06-27 09:19:36 +02:00
Bertocq
b02e2729e7 Rubocop style autocorrections 2017-12-16 17:59:16 +01:00
rgarcia
2b52d26d82 refactors notifications into concerns and shared examples 2017-12-14 16:15:30 +01:00