Issues 'Print' Layout - how to override IssuesController.show
Added by Simon Bazley over 13 years ago
Hi,
I need to print a subset of the information relating to an issue, to a 6"x4" card, to run a kanban board. I've not found anything which might allow me to print an issue, without either printing the whole issue page, or exporting the data to some other app, so I decided to try to write my own plugin.
What I want is to basically copy the functionality of the IssuesController.show function, which is used to display a single issue. Having tried and failed at that, I realised this is more of an export thing and edited the show function, to define a new Mime Type (.print which is also text/html), and so have the original controller/model use a new view (and layout) to display everything as you would expect.
The problem is, I can't see how in ruby I could extend the IssuesController.show function, to give it an extra Mime Type handler. Can anyone give any suggestions, or do I have to patch the issues_controller.rb file to make this work.