Execute rake task every day to detect new actions available for not archived proposals. If there are new actions available for today, send email to proposal's author with information text, new actions available and link to proposal dashboard url.
From now on these static pages:
`/privacy'
`/conditions'
`/accesibility'
`/help/faq'
`/welcome'
have been moved to the DB and can be modified easily by any
administrator in `/admin/site_customization/pages'
The list of emails for sending newsletters will always be ordered by
user creation date, so it will be easier to debug and to know for
which users the email has been sent.
When we insert a record in PostgreSQL and we specify the ID, the
internal ID sequence for that table isn't updated.
In order to keep the original IDs so we didn't break any foreign keys,
we specified the IDs when copying the table, resulting in a table having
its ID sequence with a value of an existing record. When trying to
insert a new record, we got a `PG::UniqueViolation` exception.
Updating the sequence after the data migration might not be the most
elegant solution, but it's easy to do and it's already been tested on a
production environment.
Ruby can't have hyphens in method names, so sending something like
`record.title_pt-BR` would raise an exception.
Using globalize's `localized_attr_name_for` method fixes the bug.
Thanks Marko for the tip.
We think aborting the migration will generate more headaches to system
administrators, who will have to manually check and fix every invalid
record before anything can be migrated.
We are using a simple unicorn.rb file in the Installer, which requires a different way of restarting the server
This task is still a little limited and hackish but it does the job for now 😌
We are killing any existing unicorn process and starting unicorn. It checks for existing processes in both the standard consul folder and in the capistrano `current` folder, and skipping any exception if unicorn was not running.
Allowing every format is way more than what we initially intended.
I've only added h2 and h3 because h1 is set somewhere else in the page
(like the title), and h4, h5 and h6 are usually not necessary.