Any text value is currently just a blob of unformatted characters. This includes User.description, Game.description, and GameRelease.notes.
Solution
Add markdown support for these fields by using the redcarpet gem. A few bullet points:
The converter uses the default Redcarpet::Render::HTML renderer and automatic generation of links for URLs is enabled.
The rails app paths /app/converters and /app/decorators were added to the autoload_paths.
A GameReleaseDecorator was created to better serve GameRelease properties (including transformed markdown) to the controller.
The GameReleaseDecorator manually generates URLs to S3 game files (though this might be changed in the future if S3 files are uploaded publically and do not contain contain so many excess params).
Problem
Any text value is currently just a blob of unformatted characters. This includes
User.description
,Game.description
, andGameRelease.notes
.Solution
Add markdown support for these fields by using the redcarpet gem. A few bullet points:
Redcarpet::Render::HTML
renderer and automatic generation of links for URLs is enabled./app/converters
and/app/decorators
were added to theautoload_paths
.GameReleaseDecorator
was created to better serveGameRelease
properties (including transformed markdown) to the controller.GameReleaseDecorator
manually generates URLs to S3 game files (though this might be changed in the future if S3 files are uploaded publically and do not contain contain so many excess params).