aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Merge branch 'rails-3-develop' of ↵Louise Crow2015-04-27-32/+84
|\ | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * Merge branch 'hotfix/0.21.0.23' into rails-3-developGareth Rees2015-04-27-24/+32
| |\
| | * Bump alaveteli versionhotfix/0.21.0.23Gareth Rees2015-04-27-1/+1
| | |
| | * Tidy InfoRequest#initial_request_textGareth Rees2015-04-27-5/+2
| | |
| | * Only load the outgoing messages that will be usedGareth Rees2015-04-27-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents loading of all outgoing messages related to the info request. Before OutgoingMessage Load (1.5ms) SELECT "outgoing_messages".* FROM "outgoing_messages" WHERE "outgoing_messages"."info_request_id" = 137 ORDER BY created_at After OutgoingMessage Load (0.8ms) SELECT "outgoing_messages".* FROM "outgoing_messages" WHERE "outgoing_messages"."info_request_id" = 137 ORDER BY created_at LIMIT 1
| | * Improve performance initializing OutgoingMessageGareth Rees2015-04-27-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduces the amount of queries to associated objects by directly checking the database before setting the default body content. Before > info_request.outgoing_messages OutgoingMessage Load (0.4ms) SELECT "outgoing_messages".* FROM "outgoing_messages" WHERE "outgoing_messages"."info_request_id" = 137 ORDER BY created_at InfoRequest Load (0.5ms) SELECT "info_requests".* FROM "info_requests" WHERE "info_requests"."id" = 137 LIMIT 1 PublicBody Load (0.5ms) SELECT "public_bodies".* FROM "public_bodies" WHERE "public_bodies"."id" = 16 LIMIT 1 HasTagString::HasTagStringTag Load (0.4ms) SELECT "has_tag_string_tags".* FROM "has_tag_string_tags" WHERE "has_tag_string_tags"."model_id" = 16 AND (model = 'PublicBody') CensorRule Load (0.4ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" IS NULL AND "censor_rules"."public_body_id" IS NULL AND "censor_rules"."user_id" IS NULL User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 13 LIMIT 1 (0.5ms) SELECT COUNT(*) FROM "censor_rules" WHERE "censor_rules"."user_id" = 13 CensorRule Load (0.5ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" = 137 ORDER BY created_at desc CensorRule Load (0.5ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."public_body_id" = 16 ORDER BY created_at desc InfoRequest Load (0.5ms) SELECT "info_requests".* FROM "info_requests" WHERE "info_requests"."id" = 137 LIMIT 1 PublicBody Load (0.5ms) SELECT "public_bodies".* FROM "public_bodies" WHERE "public_bodies"."id" = 16 LIMIT 1 HasTagString::HasTagStringTag Load (0.6ms) SELECT "has_tag_string_tags".* FROM "has_tag_string_tags" WHERE "has_tag_string_tags"."model_id" = 16 AND (model = 'PublicBody') CensorRule Load (0.5ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" IS NULL AND "censor_rules"."public_body_id" IS NULL AND "censor_rules"."user_id" IS NULL User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = 13 LIMIT 1 (0.5ms) SELECT COUNT(*) FROM "censor_rules" WHERE "censor_rules"."user_id" = 13 CensorRule Load (0.4ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" = 137 ORDER BY created_at desc CensorRule Load (0.5ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."public_body_id" = 16 ORDER BY created_at desc => [#<OutgoingMessage id: 36, info_request_id: 137, body: "Some information please", status: "sent", message_type: "initial_request", created_at: "2015-04-17 10:50:21", updated_at: "2015-04-17 10:50:21", last_sent_at: "2015-04-17 10:50:21", incoming_message_followup_id: nil, what_doing: "normal_sort", prominence: "normal", prominence_reason: nil>, #<OutgoingMessage id: 37, info_request_id: 137, body: "Dear Example Public Body 6,\r\n\r\nc'mooooooonnnnnn\r\n\r\n...", status: "sent", message_type: "followup", created_at: "2015-04-20 12:18:30", updated_at: "2015-04-20 12:18:30", last_sent_at: "2015-04-20 12:18:30", incoming_message_followup_id: 30, what_doing: "normal_sort", prominence: "normal", prominence_reason: nil>] After > info_request.outgoing_messages OutgoingMessage Load (0.8ms) SELECT "outgoing_messages".* FROM "outgoing_messages" WHERE "outgoing_messages"."info_request_id" = 137 ORDER BY created_at => [#<OutgoingMessage id: 36, info_request_id: 137, body: "Some information please", status: "sent", message_type: "initial_request", created_at: "2015-04-17 10:50:21", updated_at: "2015-04-17 10:50:21", last_sent_at: "2015-04-17 10:50:21", incoming_message_followup_id: nil, what_doing: "normal_sort", prominence: "normal", prominence_reason: nil>, #<OutgoingMessage id: 37, info_request_id: 137, body: "Dear Example Public Body 6,\r\n\r\nc'mooooooonnnnnn\r\n\r\n...", status: "sent", message_type: "followup", created_at: "2015-04-20 12:18:30", updated_at: "2015-04-20 12:18:30", last_sent_at: "2015-04-20 12:18:30", incoming_message_followup_id: 30, what_doing: "normal_sort", prominence: "normal", prominence_reason: nil>]
| | * Reduce N+1 queries in RequestGameController#playGareth Rees2015-04-27-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates the following Bullet warnings: 2015-04-21 11:42:26[WARN] /categorise/play N+1 Query detected user: vagrant InfoRequest => [:public_body] Add to your finder: :includes => [:public_body] N+1 Query method call stack /home/vagrant/alaveteli/app/views/request/_request_listing_single.html.erb:16:in `_app_views_request__request_listing_single_html_erb__949797960_70091194573720' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:46:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `each' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/controllers/application_controller.rb:111:in `record_memory' /home/vagrant/alaveteli/lib/whatdotheyknow/strip_empty_sessions.rb:14:in `call' 2015-04-21 11:42:26[WARN] /categorise/play N+1 Query detected user: vagrant InfoRequest => [:user] Add to your finder: :includes => [:user] N+1 Query method call stack /home/vagrant/alaveteli/app/views/request/_request_listing_single.html.erb:17:in `_app_views_request__request_listing_single_html_erb__949797960_70091194573720' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:46:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `each' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/controllers/application_controller.rb:111:in `record_memory' /home/vagrant/alaveteli/lib/whatdotheyknow/strip_empty_sessions.rb:14:in `call'
| | * Minor tidy upGareth Rees2015-04-27-16/+26
| | |
| | * Merge branch 'hotfix/0.21.0.22'0.21.0.22Gareth Rees2015-04-24-4/+4
| | |\
| * | \ Merge remote-tracking branch 'openaustralia/email-subject-html-entities' ↵Gareth Rees2015-04-27-8/+52
| |\ \ \ | | | | | | | | | | | | | | | into rails-3-develop
| | * | | Add a note about tidying up the spec fileHenare Degan2015-04-27-0/+2
| | | | |
| | * | | Don't put HTML entities in comment on alert plural email subject linesHenare Degan2015-04-27-1/+8
| | | | |
| | * | | Don't put HTML entities in comment on alert email subject linesHenare Degan2015-04-27-1/+8
| | | | |
| | * | | Don't put HTML entities in not clarified alert email subject linesHenare Degan2015-04-27-1/+8
| | | | |
| | * | | Don't put HTML entities in very overdue alert email subject linesHenare Degan2015-04-27-1/+8
| | | | |
| | * | | Don't put HTML entities in overdue alert email subject linesHenare Degan2015-04-27-1/+8
| | | | |
| | * | | Don't put HTML entities in requires admin email subject linesHenare Degan2015-04-27-2/+5
| | | | |
| | * | | Don't put HTML entities in new response email subject linesHenare Degan2015-04-27-1/+5
| | | | |
* | | | | Merge branch 'remove-ruby-version-files' into rails-3-developLouise Crow2015-04-27-0/+27
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Add some example sites.Louise Crow2015-04-27-0/+8
| | | | |
| * | | | Add some notes on installing and compatibility.Louise Crow2015-04-27-0/+16
| | | | |
| * | | | Ignore any live ruby version files.Louise Crow2015-04-27-0/+3
|/ / / / | | | | | | | | | | | | | | | | These are delegated to people's own development or deployment environments. https://groups.google.com/forum/#!topic/alaveteli-dev/Irs1zJ-8Wkw
* | | | Merge branch 'fix-admin-edit-body-show-path' into rails-3-developLouise Crow2015-04-27-1/+1
|\ \ \ \
| * | | | Fix link to admin show page.Louise Crow2015-04-24-1/+1
| | | | |
* | | | | Merge branch 'request-classification-association' into rails-3-developGareth Rees2015-04-27-0/+1
|\ \ \ \ \
| * | | | | Add RequestClassification association to UserGareth Rees2015-04-22-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Both ends of the association should be defined
* | | | | | Merge branch 'gemfile-https' into rails-3-developGareth Rees2015-04-27-6/+6
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | |
| * | | | | Use https protocol for git dependenciesGareth Rees2015-04-27-6/+6
|/ / / / / | | | | | | | | | | | | | | | | | | | | Generally more reliable. Had one report of git:// being blocked by an office firewall.
* | | | | Merge branch 'hotfix/0.21.0.22' into rails-3-developGareth Rees2015-04-24-4/+4
|\ \ \ \ \ | |_|/ / / |/| | | / | | |_|/ | |/| |
| * | | Bump alaveteli versionhotfix/0.21.0.22Gareth Rees2015-04-24-1/+1
| | | |
| * | | Update Nicaragua translationsGareth Rees2015-04-24-3/+3
| | |/ | |/|
* | | Merge remote-tracking branch 'openaustralia_github/email-missing-defunct' ↵Louise Crow2015-04-24-2/+1
|\ \ \ | | | | | | | | | | | | into rails-3-develop
| * | | Don't include defunct authorities in list of missing emailsHenare Degan2015-04-21-1/+1
| | | | | | | | | | | | | | | | Fixes #2358
| * | | Simplify queryHenare Degan2015-04-21-2/+1
| | |/ | |/|
* | | Merge branch 'hotfix/0.21.0.21' into rails-3-developLouise Crow2015-04-23-3/+1
|\ \ \ | | |/ | |/|
| * | Bump alaveteli version0.21.0.21hotfix/0.21.0.21Louise Crow2015-04-23-1/+1
| | |
| * | Don't redirect to signin on expiration of a non remember-me sessionLouise Crow2015-04-23-2/+0
| | | | | | | | | | | | In practice, it's just confusing if you've been away from the site.
| * | Merge branch 'hotfix/0.21.0.20'0.21.0.20Gareth Rees2015-04-17-13/+11
| |\ \
* | | | Make sure raw emails exist - the tests assume they doLouise Crow2015-04-23-0/+1
| | | |
* | | | Merge remote-tracking branch ↵Louise Crow2015-04-23-35/+48
|\ \ \ \ | | | | | | | | | | | | | | | 'nzherald_github/fix-xapian-macron-highlighting' into rails-3-develop
| * | | | Fix encoding issue with searching for macronsCaleb2015-04-20-35/+48
| | | | | | | | | | | | | | | | | | | | Correct indentation to be consistent
* | | | | Merge remote-tracking branch ↵Louise Crow2015-04-23-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'openaustralia_github/missing-contact-suggestion' into rails-3-develop
| * | | | | Send people to new change request instead of generic contact pageHenare Degan2015-04-21-1/+1
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | You get to this page by attempting to make a request and being asked to contribute an email for an authority that's missing an email so it makes sense to just send them to the change request page for this authority.
* | | | | Merge remote-tracking branch 'openaustralia_github/blank-request-email' into ↵Louise Crow2015-04-21-10/+30
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | rails-3-develop
| * | | | | Change PublicBody behaviour to not override blank request emailsHenare Degan2015-04-21-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is so if you're overriding the request email you can still observe how Alaveteli behaves when there's no request email set.
| * | | | | Remove unnecessary methodHenare Degan2015-04-21-10/+3
| | | | | |
| * | | | | Describe current PublicBody#request_email behaviour in testsHenare Degan2015-04-21-0/+27
| |/ / / /
* | | | | Merge remote-tracking branch ↵Louise Crow2015-04-21-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | 'mysociety_github/2353-precompile-only-in-production' into rails-3-develop
| * | | | Update switch-theme.rbLouise Crow2015-04-20-1/+1
|/ / / /
* | | | Merge remote-tracking branch 'nzherald_github/tweak-health-check' into ↵Louise Crow2015-04-20-1/+6
|\| | | | | | | | | | | | | | | rails-3-develop