docs/modules/develop/pages/reminders.adoc in decidim-0.28.4 vs docs/modules/develop/pages/reminders.adoc in decidim-0.29.0.rc1

- old
+ new

@@ -27,11 +27,11 @@ Reminders consist of the following database objects: - Reminder which holds the main reminder object that is attached to a user to be reminded about and the component for which the reminder is created for. The reminder can have many deliveries and many records to be reminded about. - ReminderDelivery which holds a log of all deliveries sent to the user. This may be useful in cases where we need to audit the system or solve a user support request asking why they were reminded for a specific thing at a specific time. In the backend, this also lets us do conditional logic based on how many times the user has been reminded and when the last reminder was sent. -- ReminderRecord which holds information about the records the reminder is related to. This lets us combine reminders that are related to multiple records at a time, so that we do not need to send mulitple emails for each record. For example, the budgeting reminders will contain information about in which budgets the user has pending votes which allows us to combine this information in a single email, instead of sending one email per pending order in each budget. +- ReminderRecord which holds information about the records the reminder is related to. This lets us combine reminders that are related to multiple records at a time, so that we do not need to send multiple emails for each record. For example, the budgeting reminders will contain information about in which budgets the user has pending votes which allows us to combine this information in a single email, instead of sending one email per pending order in each budget. ==== ReminderRecord states The ReminderRecord object holds a "state" attribute which tells whether the record is in one of the following states: @@ -40,10 +40,10 @@ - `deleted` - The record has been "deleted", so it will not need any further reminders. We still keep the ReminderRecord in order to preserve the backlog about when the previous reminders were sent. For example, in the budgeting reminders, the ReminderRecord is related to a budgeting "order" (or vote) which can be deleted by the user, and therefore will not need any further reminders. - `completed` - The record has been "completed", so it will not need any further reminders. The reminders can be specific to the state of the remindable objects, so we change the ReminderRecord state to "completed" when the record will not need any further reminders. For example, in the budgeting reminders, we would not want to remind the user anymore if they completed their vote in a budget but they still have pending order in another budget that will still need further reminders. In this situation, we would want to include only the pending order in the further reminders, still keeping the backlog information about the previous reminders for the already completed budget order (vote). == Defining a reminder -Reminders can be defined through initializers by defining calling the `registed` method on the reminders registry object at the Decidim main module as follows: +Reminders can be defined through initializers by defining calling the `registered` method on the reminders registry object at the Decidim main module as follows: [source,ruby] ---- Decidim.reminders_registry.register(:orders) do |reminder_registry| reminder_registry.generator_class_name = "Decidim::YourModule::YourReminderGenerator"