summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
AgeCommit message (Collapse)Author
2017-10-16fix: login error message with locale setAzul
On a failed login the warden failure app gets called. Some of the params are changed accordingly but controller and action remain. set_locale would detect there was no locale in the path and thus attempt to redirect. However the params still belong to the previous request which was a POST to Api::SessionsController. This route does not respond to get requests and so it would trigger a 404 in production and a 500 in development. This commit prevents set_locale to act upon warden failure app controller calls by adding /new to the list of `NON_LOCALE_PATHS`. (The path is updated by warden to the name of the action called in the failure app). A test is included in this commit that tries to login with an invalid username, password combination and a german locale set. fixes #8805
2017-03-23bugfix: handle couch 404sAzul
our special error handler for json requests would turn all exceptions into 500s - removed it. now the rescue_responses can do their thing again.
2016-08-19respond_to on a per controller basisAzul
If you inherit respond to and call it again in your controller it will not overwrite the previous but add to it. Since we always have some exceptions from the rules it's probably easiest to be explicit in the controllers that require it themselves.
2016-08-17bugfix: send 406 if an unexpected format is asked forAzul
It used to run the action and then trigger a 500 because the template was not found. fixes !3 .
2016-05-02upgrade: remove references to RestClientAzul
CouchRest > 1.2 does not use RestClient anymore. So we should not try to catch its errors.
2016-01-16retain locale in URL when logging in and signing up, and ajax actions in ↵elijah
general.
2015-07-14fix i18n testselijah
2015-06-15added CommonLanguages gemelijah
2015-03-17Better error message when a database is missing (very useful for nagios tests)elijah
2014-05-26remove unused bold helper and instead sanitize flashAzul
2013-12-22locale prefix support:elijah
* set locale based on request header * enforce locale path prefix when current locale is not the default * note: don't use root_path anymore, instead use home_path
2013-11-12make sure we log json request errors and their backtracesAzul
2013-09-03Ensure json requests get json error response on failureAzul
Normally rails sends an html page which can't be parsed by the client.
2013-07-11add header to prevent iframeselijah
2013-07-11set no-cache headers in the responseelijah
2013-07-04new layout for the home buttonselijah
2013-01-23make raising not found error less confusingAzul
2013-01-22render 404 if neededAzul
2012-10-31using controller extensions for application controller by handAzul
2012-10-17complete signup, login, logout workflowAzul
2012-09-27Adding in what used to be leap webapp demoAzul
we're merging repositories into one