joshua stein
e85afa2425
StoryRepository: simplify
2016-03-28 17:14:55 -05:00
joshua stein
437124da4e
StoryRepository: make positive_ranked honest
2016-03-28 17:14:43 -05:00
joshua stein
f9b309d342
separate story hiding from voting
...
A story downvote is considered a flag, just meaning the story has
problems and not necessarily that the user wants to ignore it. By
moving hiding out of Vote and into a new HiddenStory model, a user
can now both downvote/flag and hide separately, or just one or the
other.
2015-02-11 11:37:03 -06:00
joshua stein
00d347c4f4
consolidate sql fragment to cast story/comment score
2015-01-28 15:02:40 -06:00
joshua stein
9e8b89be1c
cast story.{upvotes,downvotes} to signed on mysql, integer on postgres
...
old mysql doesn't support 'cast(1 as integer)', but new/mariadb does
postgres doesn't support 'cast(1 as signed)'
should fix #145
2014-10-06 14:07:53 -05:00
joshua stein
e252d2d66e
StoryRepository: positive_ranked should end at -1
2014-08-25 17:57:26 -05:00
joshua stein
13de40df34
order newest stories by id, not created_at
...
same order (most likely) but id has an index on it and created_at
will need a full table scan
2014-08-17 18:58:45 -05:00
Fredrik Wallgren
2ffe322f64
Rename by_user to newest_by_user and sort accordingly.
2014-08-17 14:18:23 +02:00
joshua stein
8a3b133d87
style/wrapping
2014-08-03 22:07:56 -05:00
Andrey Chernih
fc52db5424
Refactor HomeController
2014-07-09 22:25:39 +04:00