mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-30 02:38:47 -04:00
When clicking "Hide Completed" on the jobs notepad, an AJAX GET request was sent without an explicit 'Accept: text/html' header. Rails evaluated `request.format` as non-HTML, causing `JobsController#notepad?` to return `false` and falling back to `respond_with` rendering the full page layout inside the notepad groups element. Here is a summary of the changes: 1. Added the 'Accept: text/html' header to transmit in `job_notepad.js`. 2. Updated `JobsController#notepad?` to treat XHR requests for the current member's jobs as notepad requests. 3. Added unit tests in `job_notepad.test.js` for the "Hide Completed" action. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>