Commit graph

6 commits

Author SHA1 Message Date
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
joshua stein a471eb180a don't hardcode "Lobsters" and "lobste.rs" everywhere, use Rails.application.{name,domain} 2013-06-30 01:50:23 -05:00
joshua stein d9b95b2a1d email and pushover reply notifications 2012-08-24 11:41:30 -05:00
joshua stein 282f505cf2 pass around root_url from view/controller into model when needed 2012-08-24 10:57:41 -05:00
joshua stein ada1571a53 invitation system, user settings 2012-08-24 10:57:11 -05:00
joshua stein 093747b796 initial work on conversion from php tree 2012-06-16 20:15:46 -05:00