aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Simplify InfoRequestEvent#is_incoming_message?Gareth Rees2015-06-04-3/+2
| | | | | | | | Just check if there's an associated InfoRequest. user system total real old 0.010000 0.000000 0.010000 ( 0.012269) new 0.000000 0.000000 0.000000 ( 0.000101)
* Pass existing track to _tracking_linksGareth Rees2015-06-04-3/+9
| | | | | | | The existing track is already found in PublicBodyController#show. Really, the partial shouldn't attempt to find one in the fallback case, but keeping for now for compatibility.
* Fix indentationGareth Rees2015-06-04-18/+16
|
* Fix alignmentGareth Rees2015-06-04-15/+15
|
* Remove unused codeGareth Rees2015-06-04-13/+1
|
* Idiomatic rubyGareth Rees2015-06-04-4/+3
|
* Indentation tidyGareth Rees2015-06-04-10/+11
|
* Use ARel syntaxGareth Rees2015-06-04-1/+1
|
* Extract logic in view to controllerGareth Rees2015-06-04-3/+4
|
* Minor tidy upGareth Rees2015-06-04-20/+22
|
* No longer need to compact typesGareth Rees2015-06-04-2/+0
|
* Use each_with_index rather than state variableGareth Rees2015-06-04-5/+2
|
* Speed up PublicBodyHelper#type_of_authorityGareth Rees2015-06-04-8/+11
| | | | | | | | | | Previously loaded all PublicBodyHeading and associated PublicBodyCategory records. Now only loads the PublicBodyCategory records that relate to the PublicBody. user system total real old 0.320000 0.000000 0.320000 ( 0.356155) new 0.010000 0.000000 0.010000 ( 0.010077)
* Fix typoGareth Rees2015-06-04-1/+1
| | | | Types should be CamelCase
* Use SQL to find first resultGareth Rees2015-06-04-4/+4
| | | | No point loading all results if we're only ever going to return the first.
* Use string interpolationGareth Rees2015-06-04-1/+1
|
* Use Hash#fetch for nil fallbackGareth Rees2015-06-04-2/+2
| | | | | Easier to understand Removes explicit return
* Use database query to return unique resultsGareth Rees2015-06-04-5/+6
| | | | Use pluck to return only public_body_id instead of filtering in Ruby
* Remove explicit returnGareth Rees2015-05-29-1/+1
|
* Use arel queryGareth Rees2015-05-29-4/+5
|
* Remove unused variableGareth Rees2015-05-29-2/+1
|
* Minor tidyGareth Rees2015-05-29-1/+15
|
* Merge branch 'hotfix/0.21.0.34' into rails-3-developLouise Crow2015-05-28-1/+1
|\
| * Bump alaveteli version0.21.0.34hotfix/0.21.0.34Louise Crow2015-05-28-1/+1
| |
| * Fix encoding issue with searching for macronsCaleb2015-05-28-35/+48
| | | | | | | | Correct indentation to be consistent
* | Merge branch 'hotfix/0.21.0.33' into rails-3-developLouise Crow2015-05-28-106/+178
|\|
| * Bump alaveteli version0.21.0.33hotfix/0.21.0.33Louise Crow2015-05-28-1/+1
| |
| * Merge branch 'handle-unparsed-email-as-binary' into hotfix/0.21.0.33Louise Crow2015-05-28-33/+64
| |\
| | * Handle unparsed email contents as binary.Louise Crow2015-05-26-14/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think I was wrong in a83b379fd2d676172855825d0592937b234371e2 in assuming that all email gets properly encoded for transfer. Looking at the mail gem load method https://github.com/mikel/mail/blob/b159e0a542962fdd5e292a48cfffa560d7cf412e/lib/mail/mail.rb#L175a, it reads raw email content from a file in binary mode. So this commit makes both reading and writing the raw_email a binary mode operation and adds a data_as_text method for displaying the data in the admin interface that coerces it to valid utf-8.
| | * Cleanup spec.Louise Crow2015-05-22-13/+14
| | | | | | | | | | | | Move setup to spec - not in common with other specs.
| | * Remove obsolete testLouise Crow2015-05-22-19/+4
| | | | | | | | | | | | | | | We don't write the data for a raw email to the database anymore. It's written to a file.
| * | Add required setupLouise Crow2015-05-28-11/+18
| | |
| * | Make sure regexes used in highlight helper are UTF-8 encodedLouise Crow2015-05-28-0/+1
| | |
| * | Make sure spelling corrections are encoded as UTF-8Louise Crow2015-05-28-1/+33
| | |
| * | Cleanup spec.Louise Crow2015-05-26-52/+54
| | | | | | | | | | | | Remove unneeded setup, fixtures are not used in these specs.
| * | Move acts_as_xapian specs to own file.Louise Crow2015-05-26-71/+73
| | |
* | | Merge branch 'rails-3-develop' of ↵Louise Crow2015-05-28-17/+15
|\ \ \ | | | | | | | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * \ \ Merge remote-tracking branch 'jpmckinney/js' into rails-3-developGareth Rees2015-05-28-1/+0
| |\ \ \
| | * | | Don't analyze JavaScript code qualityJames McKinney2015-05-27-1/+0
| | | | |
| * | | | Merge remote-tracking branch 'jpmckinney/truefalse' into rails-3-developGareth Rees2015-05-28-16/+15
| |\ \ \ \
| | * | | | Eliminate !! (bang bang)James McKinney2015-05-27-3/+3
| | | | | |
| | * | | | Avoid unnecessary ternary operationsJames McKinney2015-05-21-15/+15
| | | | | |
| | * | | | AdminUserController: remove unused instance variable and avoid unneeded ternaryJames McKinney2015-05-21-2/+1
| | | | | |
* | | | | | Merge branch 'force-filenames-to-utf8' into rails-3-developLouise Crow2015-05-28-2/+137
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Fix typoLouise Crow2015-05-15-1/+1
| | | | | |
| * | | | | Force attachment filenames to utf-8 before trying to save themLouise Crow2015-05-15-4/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a database with encoding SQL-ASCII, an invalid utf-8 filename can be saved but will cause an "invalid byte sequence in UTF-8" when the filename is prepared for display. In a database with a UTF-8 encoding, saving the string will cause an error like "ActiveRecord::StatementInvalid (PG::Error: ERROR: invalid byte sequence for encoding "UTF8""
| * | | | | Add method for forcing strings to valid utf-8Louise Crow2015-05-14-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try likely conversions but if that fails, just replace the characters that are invalid utf-8.
* | | | | | Merge branch 'rails-3-develop' of ↵Louise Crow2015-05-28-0/+6
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * | | | | Merge remote-tracking branch 'jpmckinney/codeclimate' into rails-3-developGareth Rees2015-05-27-0/+6
| |\ \ \ \ \
| | * | | | | Exclude "lib/strip_attributes/test/*" from CodeClimateJames McKinney2015-05-20-0/+6
| | | | | | |