… which is false in a production only environment. Enhance error message and protect against nil values
…n't even take care of our own language, such a shame.
…. 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.