journalduhacker/app
joshua stein 9f5e04bbba use _path for most things instead of _url
Instead of hard-coding the scheme and host everywhere, use _path
methods to show relative URLs.

Except that our previous setting of
Rails.application.routes.default_url_options in
config.after_initialize made this moot because Rails inserts that
host into all _path helpers for some reason.  So revert that
setting.

But then anything that wants an absolute URL doesn't know the
hostname and the root_url helper throws an exception.  So make a
Rails.application.root_url shortcut to pass the per-app settings in
Rails.application to root_url.

Now we can just use _path helpers most places but still use _url
ones where we need them, such as in RSS views and e-mail templates.
2015-01-02 17:02:55 -06:00
..
assets show a byline for for merged stories 2015-01-01 18:54:26 -06:00
controllers fix cancel button in comment forms 2014-12-14 01:24:18 -05:00
helpers use _path for most things instead of _url 2015-01-02 17:02:55 -06:00
indices cast story.{upvotes,downvotes} to signed on mysql, integer on postgres 2014-10-06 14:07:53 -05:00
mailers add stuff to deal with banning users 2014-01-12 15:09:32 -06:00
models use _path for most things instead of _url 2015-01-02 17:02:55 -06:00
views use _path for most things instead of _url 2015-01-02 17:02:55 -06:00