It doesn't actually do what it says, as it sets the content type
to text/html not text/plain so is just confusing and as a result
has been deprecated in newer rails versions.
Rails redirect_to uses the current controller by default, so there
is no need to re-iterate this in the code when the redirect targets
the current controller.
The short-form is already used elsewhere, this just tidies up those
which were still using the long-form.
Pages now feed back into the layout to set the content of the heading
block so we can't cache any page which has a layout as that would mean
the heading wouldn't appear when the cached page was used.
I set out to do a quick and dirty typography overhaul to make things
more consistent and a bit cleaner, but I kept running into things I
didn't like, so this lead me down something of a rabbit hole of design
tweaks to the OSM site.
Goals here are to have better content hierarchy, better vertical
rhythm, more consistent UI, cleaner markup with less tables, all while
keeping the basics pretty much intact. There are a lot of things I
didn't touch even though they need to be updated (lots of tables where
stuff shouldn't be tables, mostly).
Basic overview of changes:
I added a new persistent header that helps segment pages. It's now
a lot easier to know what you're looking at. The header has a page
title, a description, plus a submenu of actions.
There is now a pattern of 20px/10px margins and padding for more
rhythm and breathing room throughout the site.
I know there are other problems here or things I've missed - would
love another set of eyes to look over this! I am still getting comfortable
working on the site - it's my first time ever digging into a ruby or rails
so I'm not familiar with the templating language yet.