27 Commits

Author SHA1 Message Date
c0071212b2 more gem updates; minor js refactor; first pass over tests and first fixes :) 2019-09-26 02:16:05 +02:00
2108e6c59b Adding multi transfers feature 2019-05-07 09:59:58 +02:00
6ec52460d4 don't allow transfers of 0 hours and 0 minutes 2019-02-17 14:29:10 +01:00
440051ac12 Added TransferPersister 2018-05-01 12:08:05 +01:00
545ea44b7e Remove intermediate vars 2018-01-22 15:29:46 +01:00
be04d97cc7 Extract TransferFactory and decouple view 2017-08-24 20:01:24 +02:00
fc902afacb Use transfers :new template only
Now there's no point on using one for user/member and another one for
organization.
2017-08-19 21:05:19 +02:00
b50d6623cf Replace ivars with locals in views 2017-08-18 16:21:09 +02:00
24e5d6ad98 Use @accountable instead of @user or @organization
Then each particular view knows what type the accountable has and uses
the appropriate methods like user_path or organization_path.
2017-08-16 22:00:49 +02:00
fa3adf429f Abstract transfers controller by passing account
By specifying the account id we can abstract away from User or
Organization objects and trust just the account. As a result, this
removes ifs and therefore complexity.
2017-08-16 21:34:49 +02:00
0aa40730c6 Simplify #create action 2017-08-16 20:20:03 +02:00
808ed91479 DRY #new by abstracting ivars into their methods
This is slowly turning "turning difference into sameness" following
Sandi Metz style.
2017-08-16 19:52:34 +02:00
9a1d6b098a Move #give_time from orgs to transfers controller
This duplicates the OrganizationsController#give_time to
TransferController#new as it should be by Rails conventions. We aim to
stick to REST conventions of the Transfer resource instead of having
custom actions on users and organizations controllers.
2017-08-16 19:39:44 +02:00
72b7bad68f Move #give_time from users to transfer controller
This duplicates the UsersController#give_time to TransferController#new
as it should be by Rails conventions. We aim to stick to REST
conventions of the Transfer resource instead of having custom actions on
users and organizations controllers.
2017-08-16 18:53:26 +02:00
7d95fbe0ce Persist the transfer while making the movement 2016-11-18 18:12:19 +01:00
917f16d5c0 Do not allow transfers to same account
It adds a validation on the Transfer model and shows a flash error
message when that happens, without making the actual movement.
2016-11-18 18:12:19 +01:00
5941e86dc8 allow delete a comment of movements, only admin 2015-04-01 01:57:21 +02:00
be3cde497d Code style: start to make rubocop happy on controllers 2015-01-08 01:07:02 +01:00
e90f4b67a6 small fix in redirect after give time 2014-10-29 21:33:40 +01:00
f58d3f34da small fix to give time to organization 2014-10-29 11:15:11 +01:00
368ba4cdc1 Cleanup and refactor 2014-09-29 23:30:53 +02:00
375d01718c Redirect to the destination user.
See https://redbooth.com/a/#!/projects/638099/tasks/13502507

Thanks @danielmacho72
2014-09-29 23:28:15 +02:00
9a1fe41ed6 Save the post id in the transfer when time is given to an offer 2014-07-08 14:11:03 +02:00
c082f27d77 Improved localization of amount value in transfers. Translation files updated. Turbolinks disabled. 2013-12-27 19:43:34 +01:00
b583dd651f Adaptation of give_time feature to the new database model. 2013-11-12 19:28:13 +01:00
c62728b15f Allow admin to charge all accounts 2013-07-04 17:51:25 +02:00
5796f73829 A lot of transfers. Give time from everywhere. 2013-07-04 17:06:01 +02:00