aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
Commit message (Collapse)AuthorAgeLines
* Merge remote-tracking branch 'openaustralia/redirect_email_for_testing' into ↵Robin Houston2012-09-28-0/+14
|\ | | | | | | develop
| * override_request_email returns nil if configuration not setMatthew Landauer2012-09-27-2/+4
| |
| * Extract methodMatthew Landauer2012-09-27-3/+6
| |
| * Add option to override all public body request emailsMatthew Landauer2012-09-27-0/+9
| |
* | Remove file checked in by mistake.Louise Crow2012-09-27-870/+0
|/
* Allow the descriptive strings for track types to be translated.Louise Crow2012-09-26-9/+9
|
* Add a couple of email subject lines to the translations.Louise Crow2012-09-26-2/+872
|
* Make template finding for themes work with multipart mails. Fixes #628.Louise Crow2012-09-25-1/+122
|
* Remove references to 20 from the comments, now that the code accepts a ↵Louise Crow2012-09-24-4/+4
| | | | working_days param.
* Merge remote-tracking branch 'openaustralia_github/calendar_days' into developLouise Crow2012-09-24-13/+43
|\
| * Make the way number of days are calculated (either by calendar or working ↵Matthew Landauer2012-09-24-3/+16
| | | | | | | | days) configurable
| * Fix: configuration for very late number of days wasn't being usedMatthew Landauer2012-09-24-2/+2
| |
| * Added a bit more of a comment to explain how the calendar days workMatthew Landauer2012-09-24-0/+2
| |
| * Rename methodMatthew Landauer2012-09-24-5/+6
| |
| * Handle times passed to Holiday.due_date_from_calendar_daysMatthew Landauer2012-09-24-0/+3
| |
| * Add due date calculation based on calendar days rather than working daysMatthew Landauer2012-09-24-0/+9
| |
| * Make things a little more conciseMatthew Landauer2012-09-24-4/+3
| |
| * Extract method for checking whether a date is a weekend or a holidayMatthew Landauer2012-09-24-5/+8
| |
* | Add an option to disable comments on a requestRobin Houston2012-09-19-33/+36
|/ | | | Closes #30.
* Allow InfoRequest.find_old_unclassified to accept an offset param so it can ↵Louise Crow2012-09-13-2/+3
| | | | be used in conjunction with pagination.
* Add a counter cache for the number of info_requests associated with public ↵Louise Crow2012-09-12-2/+2
| | | | bodies.
* Memoize the notes_without_html calculated value for the life of the model ↵Louise Crow2012-09-12-1/+2
| | | | instance - no need to keep applying the regex if called multiple times e.g. in a view.
* Move default value setting for publication scheme to before_save callback ↵Louise Crow2012-09-12-2/+4
| | | | rather than after_initialize - after_initialize accessing of the variable value was causing eager loading of public body translations to happen after the first attribute access, resulting in n+1 queries for translations.
* Remove now unused league table method from InfoRequestEvent.Louise Crow2012-09-11-20/+2
|
* Add some more efficient methods for getting old unclassified request counts, ↵Louise Crow2012-09-11-9/+36
| | | | and random sets of small numbers of old unclassified requests.
* Add a new model for request classifications so that we can access them more ↵Louise Crow2012-09-11-0/+16
| | | | efficiently when creating league tables for the request classification game.
* Quote name correctly in query. Fixes #598.Louise Crow2012-09-04-1/+1
|
* Merge branch 'release/0.6.3' into developLouise Crow2012-08-22-24/+54
|\ | | | | | | | | | | | | | | Conflicts: app/controllers/admin_public_body_controller.rb app/views/admin_public_body/import_csv.rhtml spec/controllers/admin_public_body_controller_spec.rb spec/models/info_request_spec.rb
| * Validate presence of text to replace in censor rules.Louise Crow2012-08-14-0/+1
| |
| * Add basic validation for regexp censor rules that a valid regexp can be ↵Louise Crow2012-08-14-2/+15
| | | | | | | | created with the text of the rule.
| * Make global validation work correctly for regex censor rules.Louise Crow2012-08-14-1/+1
| |
| * Apply global and public body censor rules to binary files.Louise Crow2012-08-14-9/+10
| |
| * Handle regexp rules when running censor rules on binary files.Louise Crow2012-08-14-5/+2
| |
| * Add association between public bodies and censor rules, have info_request ↵Louise Crow2012-08-14-1/+2
| | | | | | | | apply rules from its public body.
| * Add concept of global censor rules as orthogonal to regex censor rules. ↵Louise Crow2012-08-14-20/+35
| | | | | | | | Apply global rules to every request, not regex rules.
| * Set api_key in before_save rather than after_initialize (to avoid errors ↵Seb Bacon2012-07-19-2/+4
| | | | | | | | when uploading via CSV)
* | Don't send comment alerts for external requests.Louise Crow2012-08-22-3/+4
| |
* | Email admins about external requests tooRobin Houston2012-08-21-2/+5
| | | | | | | | | | | | | | If someone reports an external request as needing administrator attention, we should email the administrators about it. Thanks for spotting this, @crowbot.
* | Fail with NotFound if request slug doesn't existRobin Houston2012-08-20-2/+4
| | | | | | | | Closes #554.
* | Do not send email for external requestsRobin Houston2012-08-20-2/+2
| |
* | Fix testsRobin Houston2012-08-20-1/+1
| | | | | | | | | | | | | | | | | | Also make the InfoRequest#is_old_unclassified? method a little more conservative, by returning false only is the is_external? method returns true. This makes it subtly inconsistent with InfoRequest.find_old_unclassified, but it is better I think to be subtly inconsistent than to risk breaking things that used to work.
* | External requests ought not to be considered old_unclassifiedRobin Houston2012-08-20-1/+2
| | | | | | | | | | We certainly do not want to send reminder emails for such requests, for example, since we do not know the email address to send them to.
* | External requests need not have exim log linesRobin Houston2012-08-20-1/+1
| | | | | | | | We do not send messages for external requests. See #548.
* | Merge branch 'wdtk' into developLouise Crow2012-08-16-8/+14
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: app/controllers/admin_request_controller.rb config/httpd.conf spec/models/info_request_spec.rb
| * | Add method all_can_view? which can be used to determine whether it is ok to ↵Louise Crow2012-08-16-8/+14
| | | | | | | | | | | | cache the associated objects for an info request in the file cache which will be served up without authentication.
| * | Time out pdftohtml after 30 secondsRobin Houston2012-07-20-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | We have a PDF document that appears to send pdftohtml into a loop where it creates millions of tiny PDF files and consumes ever-increasing amounts of memory. (This document: http://www.whatdotheyknow.com/request/119267/response/296719/attach/5/Document%203.pdf)
* | | Time out pdftohtml after 30 secondsRobin Houston2012-08-01-8/+15
| |/ |/| | | | | | | | | | | | | We have a PDF document that appears to send pdftohtml into a loop where it creates millions of tiny PDF files and consumes ever-increasing amounts of memory. (This document: http://www.whatdotheyknow.com/request/119267/response/296719/attach/5/Document%203.pdf)
* | Fix bug that only occurs when loading sample data - sometimes an InfoRequest ↵Seb Bacon2012-07-13-1/+1
| | | | | | | | doesn't have a PublicBody at the time its slug is being calculated.
* | Support regular expressions in CensorRules; also support 'global' ↵Seb Bacon2012-07-13-25/+10
|/ | | | CensorRules that aren't attached to a User or Request or Public Body (but don't expose this in the admin UI). Fixes #33
* WIP new requests feedRobin Houston2012-07-04-10/+3
|