Commit Graph

80 Commits

Author SHA1 Message Date
kikito
0ad1ff5845 changes the way public_for_api is calculated in comment 2017-06-13 12:11:20 +02:00
kikito
1701111bf5 Merge branch 'api-dev-PRs' of https://github.com/amiedes/consul into amiedes-api-dev-PRs-2 2017-06-13 12:07:28 +02:00
Alberto Miedes Garcés
9ec8b166d7 Use scopes for better query performance 2017-06-01 20:04:51 +02:00
decabeza
5e0d5fc8c3 Merge branch 'legislation-module-stable' of https://github.com/medialab-prado/consul into medialab-legislation 2017-05-22 18:43:49 +02:00
Alberto Miedes Garcés
5d9054d284 Merge branch 'master' into api-dev-PRs
Conflicts:
	Gemfile.lock
	config/routes.rb
	db/dev_seeds.rb
	db/schema.rb
2017-05-11 21:59:42 +02:00
Alberto Miedes Garcés
6b47ce065f Fix buggy associations 2017-01-27 14:27:28 +01:00
Alberto Miedes Garcés
5b7cbccd19 Merge branch 'master' into api-dev 2017-01-26 12:39:59 +01:00
Alberto Miedes Garcés
83267330a7 Group methods related to text generation for GraphQL documentation into a module 2017-01-26 10:47:12 +01:00
Alberto Miedes Garcés
e3fca5c49f Remove functionality related to votes demographic info
Since this was giving me too much pain and nobody actually requested
this functionality, I decided to remove it.
2017-01-25 13:37:29 +01:00
Juanjo Bazán
113f9b32d7 Merge branch 'master' into polls 2017-01-19 16:51:19 +01:00
Alberto Miedes Garcés
d1f14ffb93 Simplify the way GraphQL 'resolve' is used 2017-01-12 19:51:58 +01:00
Amaia Castro
a2a61341fe Merge branch 'master' into legislation-module-stable 2017-01-11 22:54:41 +01:00
Juanjo Bazán
f102f9f753 adds Budget::Investment to valid commentable types 2017-01-10 13:30:30 +01:00
Alberto Miedes Garcés
6940b90260 Add more fields to api.yml 2017-01-09 14:11:51 +01:00
Amaia Castro
b8f034d896 Legislation annotations/comments page 2017-01-09 09:29:15 +01:00
Alberto Miedes Garcés
861a723724 Only show public_voter if votable.total_votes are above threshold 2017-01-07 17:22:18 +01:00
Alberto Miedes Garcés
9c6001e987 Move public_author into module 2017-01-01 20:46:08 +01:00
Juanjo Bazán
5ec12e4b5b Merge branch 'master' into redux-polling 2016-12-27 18:22:06 +01:00
Alberto Miedes Garcés
90ff84b6ef Update API fields for Comment 2016-12-27 18:18:22 +01:00
Amaia Castro
d25d6c178c Legislation Questions model and basic admin 2016-12-20 18:52:43 +01:00
rgarcia
b104859da3 adds question comments 2016-11-16 19:41:52 +01:00
rgarcia
bb3c4c6399 adds consistency to ruby code style
Keep a blank line before and after private
Keep a blank line before and after protected
Remove extra empty line at class body end
Remove extra blank line
Add final newline
Use 2 (not 3) spaces for indentation
Use 2 (not 4) spaces for indentation
Remove space before comma
Add space after comma
Remove trailing whitespaces
Remove unnecessary spacing
Use snake_case for variable names
Do not use then for multi-line if
Remove unused block argument - i
Use the new Ruby 1.9 hash syntax
Remove unused assignment to variable
Indent when as deep as case
Align attributes
Align end with def
2016-11-15 11:18:43 +01:00
palomahnhp
d786f9edea adds the maximum length of the comments to settings 2016-03-03 15:20:29 +01:00
Juanjo Bazán
c258a4f3b4 adds scope for only normal user comments 2015-11-12 12:15:36 +01:00
kikito
73c306a673 Adds 3 orders for comments: most_voted, newest, oldest 2015-11-02 14:01:55 +01:00
kikito
0cf592af71 Fixes two issues in comment_tree
* The descendants list for a comment was not being built correctly
* The root comments must be ordered “newest first”, but their
descendants must be ordered “newest last”
2015-10-30 20:06:36 +01:00
kikito
a7daf0108b sorts comments by creation date after sorting by confidence_score 2015-10-28 17:34:02 +01:00
kikito
f5d9ea4357 adds confidence_score capacity to the comment model 2015-10-28 16:25:35 +01:00
Juanjo Bazán
b979f871dd removes unused method 2015-09-24 12:42:21 +02:00
Juanjo Bazán
23eba622a2 fix bug when blocking users 2015-09-22 16:30:43 +02:00
kikito
343025872b changes comment moderation to be similar to proposals moderation 2015-09-22 14:20:37 +02:00
kikito
793bc52d00 recalculates comments_count when restoring in addition to when hiding a comment 2015-09-18 11:00:18 +02:00
Juanjo Bazán
df72ece3c4 [admin/comments] remove comments of blocked users 2015-09-17 13:54:15 +02:00
kikito
231665020e Allows commenting Proposals in Comment validation 2015-09-12 14:05:24 +02:00
kikito
d57d538f3b Extracts Flammable module from comment & debate 2015-09-12 14:05:24 +02:00
David Gil
8ed434cc8b uses more rails-like syntax in scopes 2015-09-10 18:44:33 +02:00
kikito
2d3015703d replaces constants by class methods + private functions. Fixes broken tests 2015-09-10 13:02:21 +02:00
kikito
8c9f189d75 merges master and fixes conflicts 2015-09-09 19:36:23 +02:00
kikito
5e7a5b57de Adds max lengths and validations in models 2015-09-09 18:32:36 +02:00
Juanjo Bazán
92bff4b4c3 adds :touch to ancestry
now nested comments caches invalidates automagically
2015-09-09 14:46:09 +02:00
rgarcia
0bca1c5b95 upgrades ruby hash syntax 2015-09-05 22:02:51 +02:00
kikito
08c31c5985 calls all the sorting scopes the same way 2015-09-04 14:17:59 +02:00
kikito
9bb63e9b32 Makes comments increase the hot_score 2015-09-04 14:04:45 +02:00
Juanjo Bazán
136c1e73ed uses ancestry to retrieve debate comments 2015-09-03 16:32:54 +02:00
Juanjo Bazán
dee2d0196b ancestries
moves to ancestry from acts_as_commentable_with_threading
2015-09-02 19:23:09 +02:00
kikito
62415991c0 Fixes an issue found on comments using the dev_seed 2015-09-01 20:11:45 +02:00
kikito
b872d9a46d fixes failing specs 2015-08-28 19:19:18 +02:00
kikito
a5e48693fe Implements admin interface for Comments incl. filters 2015-08-28 10:56:43 +02:00
kikito
cd982768f2 Renames the "archive" action to "ignore_flag" (+)
* archived_at -> ignored_flag_at
* archived? -> ignored_flag?
* archive -> ignore_flag
* pending -> pending_flag_review
* archived (scope) -> with_ignored_flag
* I18n changes
2015-08-27 11:43:58 +02:00
kikito
909dfb4ce3 Several renamings
InappropiateFlag -> Flag
x.flag_as_inappropiate -> x.flag
x.undo_flag_as_inappropiate -> x.unflag
X.flagged_as_inappropiate -> x.flagged
flag-as-inappropiate-actions views & css -> flag-actions views & css
2015-08-27 10:48:49 +02:00