Commit graph

16 commits

Author SHA1 Message Date
Carl Chenet fd25aed94b update to rails 4.2.8 - merged with i18n 2017-05-19 10:29:12 +02:00
joshua stein 2ca2c94ef6 allow messages to come from system instead of a user 2015-10-15 10:01:42 -05:00
joshua stein fdf892e7f9 move user unread message count into a scope 2015-04-03 12:57:12 -05:00
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
Serge Paquet 519427586a use Rails4-style strong parameters mass assignment protection 2014-02-02 15:41:38 -05:00
joshua stein 71eeb6c7d2 be a good pushover user and let the user specify a sound
- move pushover particulars into User model
- Pushover class rescues errors, don't need to do it from User
2014-01-21 01:21:02 -06:00
joshua stein 40e4c10e26 fix busted PM e-mail notifications
do e-mail and pushover deliveries separately, catch and log errors
from each

closes #90
2014-01-08 20:42:24 -06:00
Serge Paquet 8fbf76b484 use activerecord query interface instead of deprecated finder methods 2013-12-25 16:43:50 -05:00
joshua stein ccb8094da1 change some before_create's to before_validation, :on => :create
random tokens need to be filled in before validation, otherwise the
validation is just checking a blank value
2013-07-19 22:05:00 -05: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 c9571dabaf back out 9ece666 removing utf8mb4 hacks, no longer needed 2013-05-26 12:32:54 -05:00
joshua stein 464b3c3f80 add support for viewing sent private messages 2013-01-24 14:21:22 -06:00
Jon Evans 08a8165fa9 Use new ShortId class to generate short id 2013-01-22 23:32:45 -07:00
joshua stein 9ece6666bf add stupid temporary hack to strip out utf8mb4 chars that are screwing up mysql
4-byte utf8 chars like emoji are passed around in ruby fine, but
when they are put into mysql queries, strings get truncated at the
first mb4 character.  to prevent truncation, strip out mb4
characters in most user-controlled fields like comments, story
descriptions and titles, and messages.

to properly support utf8mb4, mysql server 5.5 is needed, the table
encodings need to be changed to utf8mb4, and the mysql2 gem needs to
be upgraded once it supports utf8mb4:

https://github.com/brianmario/mysql2/issues/249
2012-11-07 21:58:10 -06:00
joshua stein c63d35a65d use a common class for rdiscount options, filter out <h#> tags, add rel=nofollow 2012-08-24 11:41:35 -05:00
joshua stein fc1c474fb3 implement private messages 2012-08-24 11:41:34 -05:00