journalduhacker/app/models
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
..
.gitkeep initial work on conversion from php tree 2012-06-16 20:15:46 -05:00
comment.rb use _path for most things instead of _url 2015-01-02 17:02:55 -06:00
hat.rb Hat: if link isn't a url, don't href to it (probably shouldn't call it link then) 2014-12-15 15:06:53 -06:00
invitation.rb use Rails4-style strong parameters mass assignment protection 2014-02-02 15:41:38 -05:00
invitation_request.rb use Rails4-style strong parameters mass assignment protection 2014-02-02 15:41:38 -05:00
keystore.rb add postgresql support 2014-01-14 21:42:27 -05:00
message.rb use _path for most things instead of _url 2015-01-02 17:02:55 -06:00
moderation.rb use Rails4-style strong parameters mass assignment protection 2014-02-02 15:41:38 -05:00
search.rb Search: escape " when sending to sphinx 2014-06-24 20:08:15 -05:00
short_id.rb change some before_create's to before_validation, :on => :create 2013-07-19 22:05:00 -05:00
stories_paginator.rb style/wrapping 2014-08-03 22:07:56 -05:00
story.rb use _path for most things instead of _url 2015-01-02 17:02:55 -06:00
story_repository.rb cast story.{upvotes,downvotes} to signed on mysql, integer on postgres 2014-10-06 14:07:53 -05:00
tag.rb add Tag.active scope to deprecate tags without removing them 2014-02-21 10:57:30 -06:00
tag_filter.rb use Rails4-style strong parameters mass assignment protection 2014-02-02 15:41:38 -05:00
tagging.rb replace some raw sql with database-agnostic activerecord queries 2013-12-30 16:23:59 -05:00
user.rb implement hats 2014-11-14 14:12:29 -06:00
vote.rb bring back story downvoting, remove low quality option 2014-03-24 10:26:06 -05:00