Commit Graph

12 Commits

Author SHA1 Message Date
Bertocq
c0feabd71e Try if notifiable has notifiable methods
Why:

There are Notifications with associated `notifiables` that actually are
not anymore Notifiables (the class doesn't include the Notifiable
concern). So when Notification delegates certain "notifiable" methods
to them the is an error.

How:

Using `try` directly on the notifiable association to avoid the delegate
trap on those corner case scenarios.
2018-07-26 10:33:04 +02:00
Bertocq
a683fcff98 Refactor notification partials and index view
The notification body has been extracted to a new partial to allow
notifications without link to be rendered without needing an if-else
duplicating view code.

Note the `link_to_if` at _notification partial, as well as the optional
body attribute.
2018-07-25 18:31:41 +02:00
decabeza
6824086f30 Adds styles for notifications views 2018-03-23 11:48:28 +01:00
rgarcia
09c44ee583 Extend notifications to be marked as read and unread 2018-03-23 11:47:06 +01:00
rgarcia
2b52d26d82 refactors notifications into concerns and shared examples 2017-12-14 16:15:30 +01:00
rgarcia
7465a8ef8e Refactors li element 2017-12-12 13:36:38 +01:00
rgarcia
e3c8dece8f Makes the code aware of notifications for hidden commentables 2017-12-11 13:22:10 +01:00
rgarcia
e2689d640c refactors notification helpers 2016-06-15 12:12:56 +02:00
rgarcia
a0ddde16e9 adds notifications for proposals 2016-06-07 22:03:14 +02:00
Juanjo Bazán
704a038795 groups notifications 2016-01-08 14:32:16 +01:00
Alberto Garcia Cabeza
e008d1f642 Adds new styles for notifications 2016-01-08 12:45:37 +01:00
rgarcia
e2f419e625 destroy notifications when marked as read 2016-01-07 12:02:01 +01:00