Bertocq
fafec293e8
Remove duplicated ability for everyone
2017-07-11 12:51:39 +02:00
BertoCQ
204ea13c85
Merge branch 'master' into followable
2017-07-11 11:30:49 +02:00
Senén Rodero Rodríguez
b0ee52556c
Remove comment
2017-07-11 10:36:07 +02:00
Bertocq
beb4bc119c
Fix Rails/Delegate rubocop issue
2017-07-10 23:02:27 +02:00
Bertocq
efacd0def3
Make calculate_winners explicitly delayed
...
Why:
* As seen on preproduction and production environments on Madrid's fork. Budget::Result#calculate_winners is very costly when done to all headings for a given budget (as requested on Admin::BudgetsController#calculate_winners) but its not when done individually for only a heading (as requested on Budget::Investment#recalculate_heading_winners)
How:
* Removing `handle_asynchronously :calculate_winners` from bellow Budget::Result#calculate_winners definition, to avoid making any call delayed. And explicitly calling `.delay` only when needed (on Admin::BudgetsController#calculate_winners)
2017-07-10 15:12:14 +02:00
Bertocq
2b85deabec
Recalculate heading winners on incompatibility change
...
Why:
* We should recalculate winners also when an incompatible investment is flagged as compatible again
How:
* Removing the condition to recalculate that was checking only for a winner investment flagged as incompatible
* Extending the Budget::Result model spec to cover that new scenario
2017-07-10 14:24:55 +02:00
Bertocq
69f4e1c683
Fix all rubocop Metrics/LineLength issues (140+)
2017-07-10 13:22:49 +02:00
María Checa
089c690b49
Created new entry point CensusCaller
...
Here's a better alternative than the first one. Added a new abstraction level from which are performed both types of census calls, while the logic of those is managed in their own library.
2017-07-10 12:22:30 +02:00
María Checa
7e701db608
Added new census data source to Verification::Residence
...
Adapted model to perform a query to find a `LocalCensusRecord` record in case the census API is not available or returns invalid data.
2017-07-08 20:39:05 +02:00
María Checa
feff9fff0f
LocalCensus model created
2017-07-08 19:56:10 +02:00
Senén Rodero Rodríguez
4b2310c135
Move and refactor method from follow to user model to get user interests. Add specification to check the discard of duplicate interests.
2017-07-07 15:18:34 +02:00
taitus
5fe894aa6b
New proposal method to get users_to_notify.
2017-07-07 13:38:52 +02:00
taitus
b60748c552
Remove unneeded return from Follow model. Add whitespaces to enhance reading.
2017-07-07 13:38:52 +02:00
taitus
b29bf62f56
Send proposals notifications to followers.
2017-07-07 13:37:55 +02:00
taitus
35f7f11177
Add dependent destroy to followable.
2017-07-07 13:37:55 +02:00
taitus
14ec4f5315
Add styles and translations for users interests.
2017-07-07 13:37:53 +02:00
taitus
19820e4432
Add public interests validation and show interests on user profile
2017-07-07 13:34:43 +02:00
taitus
bce28afe36
Add followable to budget investment model.
2017-07-07 12:07:25 +02:00
Senén Rodero Rodríguez
84dbef16a4
Create followable concern, follow model. Add followable to proposal model.
2017-07-07 12:02:00 +02:00
BertoCQ
e990568895
Merge pull request #1721 from consul/feature/add_slugs_to_budget_related
...
Add slugs to budget related
2017-07-05 13:16:24 +02:00
Bertocq
e3d89261a6
Add Sluggable concern and unique validation to Budget, Group and Heading
...
* What: We need to generate slug on Budget, Group and Heading classes, validating its unique for its scope
* How: Adding a presence and unique validation using Budget always as scope.
2017-07-05 12:33:16 +02:00
Bertocq
2888c20489
Fix all Style/RedundantSelf rubocop issues
2017-07-05 11:55:52 +02:00
Bertocq
97d7a21791
Fix all Style/RedundantReturn rubocop issues
2017-07-05 11:55:52 +02:00
Bertocq
28970c6701
Fix all Style/UnneededInterpolation rubocop issues and remove from rubocop_tod
2017-07-04 22:44:08 +02:00
Bertocq
4535fc9345
Create Sluggable concern, generates slug using name attribute before validation
...
Why:
* We need a way to generate a slug for a object given his name attribute value
How:
* A concern that generates the slug before validation
2017-07-04 18:40:54 +02:00
Bertocq
9f38192e13
Remove unnecesary frozen_string_literal comment
2017-07-04 17:25:15 +02:00
Raimond Garcia
e7e5b3c4a3
Merge branch 'master' into 1647-locale_site_customization
2017-07-04 12:11:07 +02:00
Bertocq
339597483e
Add incompatible scope to Budget Investment model
2017-07-04 01:34:25 +02:00
Bertocq
99052485fb
Recalculate heading winner investments when a winner is flagged as incompatible
2017-07-04 01:34:24 +02:00
Bertocq
640e0e1c2a
Use compatible filter when calculating budget heading winners
2017-07-04 01:34:24 +02:00
Bertocq
ed016d7afd
Add compatible scope to Budget Investment and use it on the winners scope
...
Why:
* Only compatible investments can be winners
How:
* Using the new column incompatible to filter compatible investments
2017-07-04 01:34:24 +02:00
María Checa
36d51b380b
Merge branch 'master' into 1647-locale_site_customization
2017-07-02 23:19:40 +02:00
María Checa
8894ec4f7c
Pages form improvements
...
Added `locale` validation to model and improved its form select tag performance.
2017-07-02 21:28:13 +02:00
María Checa
ed7b7f0361
Added scope to pages model
...
New scope to use when listing pages to show only the ones with current locale.
2017-07-02 14:54:11 +02:00
Eduardo Martinez Echevarria
a599a0b91e
Set legislation processes visibility depending on publication
2017-06-30 15:08:23 +02:00
Bertocq
c4ba35bf63
Revert rubocop autocorrections and add it to exclusion list on rubocop_todo file
2017-06-28 14:33:34 +02:00
Bertocq
904e3fdcfa
Fix all Style/HashSyntax rubocop issues and remove from rubocop_todo list
2017-06-28 14:12:51 +02:00
Bertocq
c9bc028524
Remove all unnecesary extra spacing and Layout/ExtraSpacing list from rubocop file
2017-06-28 14:12:51 +02:00
Bertocq
775da2d581
Remove all Layout/EmptyLines issues on code and file list from rubocop_todo
2017-06-28 14:12:51 +02:00
Bertocq
2fa92937d2
Fix all Style/BracesAroundHashParameters rubocop issues and remove them from rubocop_todo list
2017-06-28 14:12:51 +02:00
Bertocq
1c8e039862
Fix all Layout/SpaceInsideParens rubocop issues and remove files from rubocop_todo list
2017-06-26 18:06:01 +02:00
Bertocq
c4d90691b1
Fix all Layout/SpaceInLambdaLiteral rubocop issues and remove files from rubocop_todo list
2017-06-26 18:05:14 +02:00
Bertocq
f6fe9cc7d2
Fix all Layout/SpaceAroundOperators rubocop issues and remove file list from rubocop_todo list
2017-06-26 18:04:20 +02:00
Bertocq
d7b8777395
Fix all Layout/SpaceAroundEqualsInParameterDefault rubocop issues from rubocop_todo list
2017-06-26 18:03:40 +02:00
Bertocq
e6dd33bd66
Fix all Layout/SpaceAfterComma issues and remove from rubocop_todo list
2017-06-26 17:57:53 +02:00
Bertocq
01263050a6
Fix Layout/SpaceAfterNot rubocop issue and remove from rubocop_todo list
2017-06-26 17:57:53 +02:00
Bertocq
9763931f55
Fix all Layout/SpaceBeforeComma rubocop issues and remove from rubocop_todo list
2017-06-26 17:57:53 +02:00
Bertocq
b074090e92
Fix Layout/SpaceInsidePercentLiteralDelimiters rubocop issue and remove from rubocop todo list
2017-06-26 17:57:53 +02:00
Bertocq
a76033fb72
Fix all Style/StringLiteralsInInterpolation rubocop issues and remove from rubocop_todo list
2017-06-26 17:57:53 +02:00
Bertocq
80bcf38dc5
Fix all Layout/TrailingWhitespace rubocop issues and remove from rubocop_todo list
2017-06-26 17:57:53 +02:00