Rinku does not autolink localhost links used by Rails in :development mode.
irb(main):010:0> Rinku.auto_link("http://localhost:3000/products")
=> "http://localhost:3000/products"
While this URL might be missing a TLD, it's still weird that Rinku skips it. I actually thought Rinku was broken, but it turns out it was just ignoring my localhost links.
As a result, I believe my autolinking code will work in production -- where the URLs generated by the router will inherit the top-level domain from the production site -- but continue to fail in development and testing.
Ideally, for the sake of consistency, it should work in all three environments.
Rinku does not autolink localhost links used by Rails in
:developmentmode.While this URL might be missing a TLD, it's still weird that Rinku skips it. I actually thought Rinku was broken, but it turns out it was just ignoring my localhost links.
As a result, I believe my autolinking code will work in production -- where the URLs generated by the router will inherit the top-level domain from the production site -- but continue to fail in development and testing.
Ideally, for the sake of consistency, it should work in all three environments.