aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
Commit message (Collapse)AuthorAgeLines
* Explicitly set I18n.locale in set_gettext_locale in order to get Rails to ↵0.11.0.13hotfix/0.11.0.13Louise Crow2013-06-17-1/+4
| | | | expire the template cache and trigger a lookup.
* Only render the popup banner in the layout where it's actually used.Louise Crow2013-06-11-4/+0
|
* For non-HTML requests, just return the response code for now.Louise Crow2013-06-03-1/+4
|
* Add logging of any errors.Louise Crow2013-05-02-0/+4
|
* Remove now unused methodsLouise Crow2013-05-02-50/+0
|
* Handle routing errors with our custom template too.Louise Crow2013-05-02-1/+4
|
* Clearer setting of status code, addition of notification.Louise Crow2013-05-02-10/+17
|
* Return the correct status codes for ActiveRecord::RecordNotFound, ↵Louise Crow2013-05-02-0/+8
| | | | ActionController::UnknownAction, PermissionDenied and general exceptions.
* Add new error handler method that renders the general/exception_caught templateLouise Crow2013-05-02-0/+13
|
* Change email address in header of source code to hello@mysociety.orgMatthew Landauer2013-03-26-1/+1
|
* Merge remote-tracking branch 'mysociety/develop' into rails-3-developHenare Degan2013-03-14-17/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/admin_request_controller.rb app/controllers/admin_track_controller.rb app/controllers/request_controller.rb app/controllers/services_controller.rb app/helpers/link_to_helper.rb app/mailers/request_mailer.rb app/models/application_mailer.rb app/models/info_request.rb app/views/admin_censor_rule/edit.html.erb app/views/admin_censor_rule/new.html.erb app/views/admin_public_body/_form.html.erb app/views/admin_public_body/_locale_selector.html.erb app/views/admin_public_body/_one_list.html.erb app/views/admin_public_body/edit.html.erb app/views/admin_public_body/list.html.erb app/views/admin_public_body/new.html.erb app/views/admin_request/_incoming_message_actions.html.erb app/views/admin_request/edit.html.erb app/views/admin_request/edit_comment.html.erb app/views/admin_request/edit_outgoing.html.erb app/views/admin_request/list.html.erb app/views/admin_request/list_old_unclassified.html.erb app/views/admin_request/show.html.erb app/views/admin_track/_some_tracks.html.erb app/views/admin_track/list.html.erb app/views/admin_user/edit.html.erb app/views/admin_user/list.html.erb app/views/admin_user/show.html.erb app/views/general/_footer.html.erb app/views/general/exception_caught.html.erb app/views/help/contact.html.erb app/views/layouts/default.html.erb app/views/public_body/_alphabet.html.erb app/views/request/_request_listing_single.html.erb app/views/request/_sidebar.html.erb app/views/request/new.html.erb app/views/request/show.html.erb app/views/request_mailer/external_response.rhtml app/views/request_mailer/fake_response.rhtml config/environment.rb config/environments/production.rb config/routes.rb spec/controllers/admin_censor_rule_controller_spec.rb spec/controllers/request_controller_spec.rb spec/controllers/track_controller_spec.rb spec/helpers/link_to_helper_spec.rb spec/mailers/request_mailer_spec.rb spec/models/info_request_spec.rb spec/spec_helper.rb spec/views/public_body/show.html.erb_spec.rb spec/views/request/show.html.erb_spec.rb vendor/plugins/rails_xss/lib/rails_xss/erubis.rb
| * Pass parameters to method rather explicitlyMatthew Landauer2013-02-12-9/+9
| |
| * Inline methodMatthew Landauer2013-02-12-8/+4
| |
| * Simplify param_exists methodMatthew Landauer2013-02-12-1/+1
| |
* | Not required with the new version of exception_notificationHenare Degan2013-03-05-3/+0
| |
* | Rename Configuration class to avoid conflict with ActiveSupport::ConfigurableHenare Degan2013-03-03-8/+8
| |
* | Rename ALL THE TEMPLATES!!1!!!one!!1!!Henare Degan2013-02-27-1/+1
| | | | | | | | .rhtml is deprecated in favour of .erb in Rails 3
* | Merge branch 'develop' into rails-3-spikeHenare Degan2013-02-15-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/general_controller.rb app/controllers/track_controller.rb app/models/outgoing_message.rb app/models/public_body.rb app/models/user.rb app/views/general/frontpage.rhtml config/environment.rb config/initializers/inflections.rb config/initializers/mime_types.rb db/migrate/094_remove_old_tags_foreign_key.rb lib/timezone_fixes.rb spec/models/request_mailer_spec.rb spec/views/request/list.rhtml_spec.rb
| * Mark popup banner as html_safeLouise Crow2013-02-08-1/+1
| |
* | Fixup up test_code_redirect_by_email_token for rspec 2Matthew Landauer2013-01-29-1/+2
| |
* | Merge remote-tracking branch 'mysociety/develop' into rails-3-spikeMatthew Landauer2013-01-04-0/+13
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock Rakefile app/controllers/request_controller.rb lib/tasks/rspec.rake spec/controllers/services_controller_spec.rb spec/spec_helper.rb spec/views/request/_after_actions.rhtml_spec.rb
| * Merge branch 'hotfix/authenticate-and-expire-download-zips' into developLouise Crow2012-12-13-0/+13
| |\
| | * Remove any download zip files when a request's cached files are expired.Louise Crow2012-12-13-0/+4
| | |
| | * Put download zips in a predictable location - sharded folders based on ↵Louise Crow2012-12-13-0/+5
| | | | | | | | | | | | request ID, rather than distributing them across the download directories by the generated SHA. Preserve the uniqueness of the subdirectory.
| | * Use helper method for download path, and use Rails.root instead of file ↵Louise Crow2012-12-13-0/+4
| | | | | | | | | | | | location.
* | | Using #request_uri is deprecatedHenare Degan2012-12-11-1/+1
| | |
* | | Thought I got this in b0ae75aba63d40146cfbc7e6af27e1d6051f1804 but it must ↵Henare Degan2012-12-11-3/+0
| | | | | | | | | | | | have been set twice - safety first!
* | | Disable rescue customisations until we can move it to rackHenare Degan2012-12-11-13/+14
| | |
* | | This is deprecated and now set in application.rbHenare Degan2012-12-11-3/+0
|/ /
* | Give the implicit default locale in a URL without locale precedence over the ↵Louise Crow2012-11-28-2/+7
| | | | | | | | session in the case where the default locale is not being included in URLs. This allows the user to return to the default locale.
* | Fix styling of error page with current themesMatthew Landauer2012-11-16-7/+4
|/
* Move methods used only in admin controllers to admin_controller.rbLouise Crow2012-10-30-24/+0
|
* If we're doing admin authentication internally, don't bother with the ↵Louise Crow2012-10-30-2/+8
| | | | request environment, set the admin_name on the session instead.
* Redirect calls to admin_http_auth_user to more generic wrapper ↵Louise Crow2012-10-30-0/+4
| | | | admin_current_user
* Remove svn tags that are out of date as we are now using gitMatthew Landauer2012-10-09-2/+0
|
* Extract configuration with defaults into one moduleMatthew Landauer2012-09-25-10/+7
|
* Don't pass a page param of less than one through to Xapian, treat it as a ↵Louise Crow2012-08-21-3/+6
| | | | param of 1. Fixes #557.
* Merge branch 'wdtk' into developLouise Crow2012-08-16-0/+3
|\ | | | | | | | | | | | | Conflicts: app/controllers/admin_request_controller.rb config/httpd.conf spec/models/info_request_spec.rb
| * Method spacing.Louise Crow2012-08-16-0/+3
| |
* | Set locale even for errorsRobin Houston2012-08-01-0/+7
| | | | | | | | | | | | | | | | | | | | | | The locale was not being set correctly for error pages, causing some order-dependent test failures, e.g.: script/spec spec/controllers/services_controller_spec.rb spec/integration/errors_spec.rb was failing. Many many many thanks to Louise Crow for tracking this one down!
* | Factor popup banner out into own partial, for easier setting/unsetting ↵Seb Bacon2012-07-13-0/+4
|/ | | | (including from themes). Fixes #524
* Fix admin debug methodRobin Houston2012-06-04-3/+0
| | | | | | | | | | | > 10) admin debug (https://secure.mysociety.org/admin/foi/debug) - "you > are" - sentence that isn't finished > > 11) admin debug (https://secure.mysociety.org/admin/foi/debug) - > versioning incorrect & URLs to github malformed: > Alaveteli version: 0.5.2-297-g4ec7f6e > Alaveteli branch: (no > Alaveteli commit: 4ec7f6edbf2c00abc8464eafc889047f43533f90
* File.dirname(__FILE__) is not necessarily absoluteRobin Houston2012-06-03-1/+1
| | | | | | | It’s weird that there’s so much code here that implicitly assumes File.dirname(__FILE__) is an absolute path, because really in general it very much is not! This assumption was invalidated by the recent bundler-awareness changes.
* Merge branch 'develop' into feature/fix-404-in-themesSeb Bacon2012-05-15-16/+16
|\
| * Remove trailing whitespace (to make a cleaner forthcoming merge with ↵Seb Bacon2012-05-15-16/+16
| | | | | | | | wombleton:feature/440_sparkly_admin_css)
* | Add a comment to explain why we're calling `set_view_paths` in the ↵Seb Bacon2012-05-15-2/+7
| | | | | | | | controller when the method doesn't exist in Alaveteli code. See [this comment](https://github.com/sebbacon/alaveteli/issues/320#issuecomment-5711523) for discussion.
* | Allow themes to effect the design of error pagesSeb Bacon2012-05-15-0/+7
|/
* More changes and refactoring to make purges work.Seb Bacon2012-04-20-10/+1
|
* use Rails.root, not RAILS_ROOTJames McKinney2012-04-02-1/+1
|
* Fix the "log in as" functionRobin Houston2012-03-20-2/+2
| | | | | | | | | | | | | | | Previously the "log in as" function after 3b6e5a692b852a88f55b21a7210f60a6f7cfc24b would attempt to log the admin user out before issuing the redirect. Unfortunately this approach does not work on WhatDoTheyKnow, where the admin pages are served via a different domain (secure.mysociety.org) and so do not share session information with the rest of the site. This commit changes it to mark the PostRedirect with circumstance == "login_as", which signals the user controller to log out the previous user even if they are an admin. In other words, the user is logged out on the main site rather than the admin site, skirting this problem. Closes #450.