…. closes #62 The old behavior was rather buggy as it created a new redirect everytime an article or page permalink was updated. This shortened URL was never displayed because we only called the first redirect instead of the last one. This commit: * Fixes existing old shortened URL showing when multiple shorten URLS exist * Fixes this behavior by updating the existing shortened URL when a published article or page permalink is updated * Moves the shortened URL creation from controller to model * Removes duplicate code between admin/content_controller and admin/page_controller * Adds specs as this part was never tested before * Tells a story about a young farm boy, a princess called Buttercup (silly name if you want my opinion), true love and high adventure, pirates, princess, giants, miracles, fencing, and rodents of unusual size.
… is where they should be
Refactores existing code to remove duplicate code entries and not needed mthods when building the permalink from the model.
… be a Hash, but was a String) Thank you to Georges Arnould for finding out and fixing.
Theme catalogue now returns a 404 and is not maintained anymore. We've lost typogarden.org (I actually forgot to renew it) and most themes were not supported anymore. We'll need to find a way to display themes, maybe using themes.typosphere.org with a statically cached blog, I need to think about this first.
…already called from the parent class and therefore inherits from it. Only exceptions: pages and content controller as they don't want to use this layout for autosave and preview.
Seems like the class_attribute method actually needs a method to return. That's the reason why a simple salt='foodbar' followed by a class_attribute :salt returned nil. I've added a simple test to ensure that User.salt is never nil, but shouldn't this be protected?